kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] Documentation: Coccinelle: fix typos and command example
       [not found] <0616dd0c-bb86-be2b-3dc6-1c695a92c3ca@infradead.org>
@ 2020-06-30  8:04 ` Markus Elfring
  2020-06-30 12:23 ` Markus Elfring
  1 sibling, 0 replies; 22+ messages in thread
From: Markus Elfring @ 2020-06-30  8:04 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

> @@ -177,13 +177,13 @@ For example, to check drivers/net/wirele
>  To apply Coccinelle on a file basis, instead of a directory basis, the
>  following command may be used::
>
> -    make C=1 CHECK="scripts/coccicheck"
> +    make C=1 CHECK="scripts/coccicheck" path/to/file.c

Can such information still be questionable according to usual make functionality?

* Do you usually expect that such a source file does not need to be regenerated
  (because it should be up-to-date already according a selected revision)?

* Would you like to trigger the generation of a corresponding source code
  analysis log file (or a “diff”)?

* How do you think about to pass an other parameter to the build target “coccicheck”?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2] Documentation: Coccinelle: fix typos and command example
       [not found] <0616dd0c-bb86-be2b-3dc6-1c695a92c3ca@infradead.org>
  2020-06-30  8:04 ` [PATCH v2] Documentation: Coccinelle: fix typos and command example Markus Elfring
@ 2020-06-30 12:23 ` Markus Elfring
  2020-06-30 15:11   ` Randy Dunlap
  1 sibling, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-06-30 12:23 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

…
> +++ linux-next-20200629/Documentation/dev-tools/coccinelle.rst
…> @@ -177,13 +177,13 @@ For example, to check drivers/net/wirele
>  To apply Coccinelle on a file basis, instead of a directory basis, the
>  following command may be used::
>
> -    make C=1 CHECK="scripts/coccicheck"
> +    make C=1 CHECK="scripts/coccicheck" path/to/file.c

I would like to clarify further software design aspects around such make functionality.

We might stumble on different interpretations according to the wording “file basis”.
Do you find a message like “make: Nothing to be done for 'path/to/file.c'.” interesting then?

* Would you like to add any links for information around the support for
  source code checkers?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?id=7c30b859a947535f2213277e827d7ac7dcff9c84#n198

* How do you think about to enclose the path for the shown parameter
  by single quotes instead of double quotes?

* Can such path specifications become more interesting occasionally
  if also an other file extension would be chosen than “.c”?
  Would you like to achieve any software extensions around suffix rules?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2] Documentation: Coccinelle: fix typos and command example
  2020-06-30 12:23 ` Markus Elfring
@ 2020-06-30 15:11   ` Randy Dunlap
  2020-07-01 11:56     ` Markus Elfring
  0 siblings, 1 reply; 22+ messages in thread
From: Randy Dunlap @ 2020-06-30 15:11 UTC (permalink / raw)
  To: Markus Elfring, linux-doc, Coccinelle
  Cc: Michal Marek, Gilles Muller, kernel-janitors, Jonathan Corbet,
	Nicolas Palix, LKML, Julia Lawall

On 6/30/20 5:23 AM, Markus Elfring wrote:
> …
>> +++ linux-next-20200629/Documentation/dev-tools/coccinelle.rst
> …> @@ -177,13 +177,13 @@ For example, to check drivers/net/wirele
>>  To apply Coccinelle on a file basis, instead of a directory basis, the
>>  following command may be used::
>>
>> -    make C=1 CHECK="scripts/coccicheck"
>> +    make C=1 CHECK="scripts/coccicheck" path/to/file.c
> 
> I would like to clarify further software design aspects around such make functionality.
> 
> We might stumble on different interpretations according to the wording “file basis”.
> Do you find a message like “make: Nothing to be done for 'path/to/file.c'.” interesting then?
> 
> * Would you like to add any links for information around the support for
>   source code checkers?
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?id|30b859a947535f2213277e827d7ac7dcff9c84#n198
> 
> * How do you think about to enclose the path for the shown parameter
>   by single quotes instead of double quotes?
> 
> * Can such path specifications become more interesting occasionally
>   if also an other file extension would be chosen than “.c”?
>   Would you like to achieve any software extensions around suffix rules?
> 
> Regards,
> Markus

Markus:

Feel free to submit patches.

-- 
~Randy

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2] Documentation: Coccinelle: fix typos and command example
  2020-06-30 15:11   ` Randy Dunlap
@ 2020-07-01 11:56     ` Markus Elfring
  2020-07-01 13:20       ` Randy Dunlap
  0 siblings, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 11:56 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>> …
>>> +++ linux-next-20200629/Documentation/dev-tools/coccinelle.rst
>> …
>> > @@ -177,13 +177,13 @@ For example, to check drivers/net/wirele
>>>  To apply Coccinelle on a file basis, instead of a directory basis, the
>>>  following command may be used::
>>>
>>> -    make C=1 CHECK="scripts/coccicheck"
>>> +    make C=1 CHECK="scripts/coccicheck" path/to/file.c
>> We might stumble on different interpretations according to the wording “file basis”.
>> Do you find a message like “make: Nothing to be done for 'path/to/file.c'.” interesting then?
>>
>> * Would you like to add any links for information around the support for
>>   source code checkers?
>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?id=7c30b859a947535f2213277e827d7ac7dcff9c84#n198
> Feel free to submit patches.

How do you think about to use the following command variant
for the adjustment of the software documentation?

+    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 11:56     ` Markus Elfring
@ 2020-07-01 13:20       ` Randy Dunlap
  2020-07-01 13:32         ` [v2] " Markus Elfring
  0 siblings, 1 reply; 22+ messages in thread
From: Randy Dunlap @ 2020-07-01 13:20 UTC (permalink / raw)
  To: Markus Elfring, linux-doc, Coccinelle
  Cc: Michal Marek, Gilles Muller, kernel-janitors, Jonathan Corbet,
	Nicolas Palix, LKML, Julia Lawall

On 7/1/20 4:56 AM, Markus Elfring wrote:
>>> …
>>>> +++ linux-next-20200629/Documentation/dev-tools/coccinelle.rst
>>> …
>>>> @@ -177,13 +177,13 @@ For example, to check drivers/net/wirele
>>>>  To apply Coccinelle on a file basis, instead of a directory basis, the
>>>>  following command may be used::
>>>>
>>>> -    make C=1 CHECK="scripts/coccicheck"
>>>> +    make C=1 CHECK="scripts/coccicheck" path/to/file.c
> …
>>> We might stumble on different interpretations according to the wording “file basis”.
>>> Do you find a message like “make: Nothing to be done for 'path/to/file.c'.” interesting then?
>>>
>>> * Would you like to add any links for information around the support for
>>>   source code checkers?
>>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?id|30b859a947535f2213277e827d7ac7dcff9c84#n198
> …
>> Feel free to submit patches.
> 
> How do you think about to use the following command variant
> for the adjustment of the software documentation?
> 
> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
> 

I don't understand the reason for that change...


-- 
~Randy

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 13:20       ` Randy Dunlap
@ 2020-07-01 13:32         ` Markus Elfring
  2020-07-01 14:52           ` Randy Dunlap
  0 siblings, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 13:32 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>>>> We might stumble on different interpretations according to the wording “file basis”.
>>>> Do you find a message like “make: Nothing to be done for 'path/to/file.c'.” interesting then?
>>>>
>>>> * Would you like to add any links for information around the support for
>>>>   source code checkers?
>>>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?id=7c30b859a947535f2213277e827d7ac7dcff9c84#n198
>> …
>>> Feel free to submit patches.
>>
>> How do you think about to use the following command variant
>> for the adjustment of the software documentation?
>>
>> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
>
> I don't understand the reason for that change...

Is our understanding still incomplete for the support of source code checking parameters
by the make script?

* Will software analysis be performed in addition to the desired compilation
  of a source file (according to the selected object file)?

* How do you think about to trigger only the generation of analysis results
  for a single file?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 13:32         ` [v2] " Markus Elfring
@ 2020-07-01 14:52           ` Randy Dunlap
  2020-07-01 15:02             ` Markus Elfring
  2020-07-02  0:08             ` Matthew Wilcox
  0 siblings, 2 replies; 22+ messages in thread
From: Randy Dunlap @ 2020-07-01 14:52 UTC (permalink / raw)
  To: Markus Elfring, linux-doc, Coccinelle
  Cc: Michal Marek, Gilles Muller, kernel-janitors, Jonathan Corbet,
	Nicolas Palix, LKML, Julia Lawall

On 7/1/20 6:32 AM, Markus Elfring wrote:
>>>>> We might stumble on different interpretations according to the wording “file basis”.
>>>>> Do you find a message like “make: Nothing to be done for 'path/to/file.c'.” interesting then?
>>>>>
>>>>> * Would you like to add any links for information around the support for
>>>>>   source code checkers?
>>>>>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?id|30b859a947535f2213277e827d7ac7dcff9c84#n198
>>> …
>>>> Feel free to submit patches.
>>>
>>> How do you think about to use the following command variant
>>> for the adjustment of the software documentation?
>>>
>>> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
>>
>> I don't understand the reason for that change...

IOW, your "patch" needs justification and/or explanation. It was missing that info.

> Is our understanding still incomplete for the support of source code checking parameters
> by the make script?
> 
> * Will software analysis be performed in addition to the desired compilation
>   of a source file (according to the selected object file)?
> 
> * How do you think about to trigger only the generation of analysis results
>   for a single file?

Do I need to remove that line from the patch?

Feel free to submit patches, not just comments.

-- 
~Randy

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 14:52           ` Randy Dunlap
@ 2020-07-01 15:02             ` Markus Elfring
  2020-07-01 15:07               ` Randy Dunlap
  2020-07-02  0:08             ` Matthew Wilcox
  1 sibling, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 15:02 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>>>> How do you think about to use the following command variant
>>>> for the adjustment of the software documentation?
>>>>
>>>> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
>>>
>>> I don't understand the reason for that change...
>
> IOW, your "patch" needs justification and/or explanation. It was missing that info.

I hope that the clarification of the presented questions can result into
relevant information.


>> Is our understanding still incomplete for the support of source code checking parameters
>> by the make script?
>>
>> * Will software analysis be performed in addition to the desired compilation
>>   of a source file (according to the selected object file)?
>>
>> * How do you think about to trigger only the generation of analysis results
>>   for a single file?
>
> Do I need to remove that line from the patch?

I propose to adjust it another bit.
The desired change agreement might need further communication efforts.


> Feel free to submit patches, not just comments.

Would you like to integrate any more details from the running patch review?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:02             ` Markus Elfring
@ 2020-07-01 15:07               ` Randy Dunlap
  2020-07-01 15:15                 ` Markus Elfring
  2020-07-01 15:15                 ` Markus Elfring
  0 siblings, 2 replies; 22+ messages in thread
From: Randy Dunlap @ 2020-07-01 15:07 UTC (permalink / raw)
  To: Markus Elfring, linux-doc, Coccinelle
  Cc: Michal Marek, Gilles Muller, kernel-janitors, Jonathan Corbet,
	Nicolas Palix, LKML, Julia Lawall

On 7/1/20 8:02 AM, Markus Elfring wrote:
>>>>> How do you think about to use the following command variant
>>>>> for the adjustment of the software documentation?
>>>>>
>>>>> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
>>>>
>>>> I don't understand the reason for that change...
>>
>> IOW, your "patch" needs justification and/or explanation. It was missing that info.
> 
> I hope that the clarification of the presented questions can result into
> relevant information.
> 
> 
>>> Is our understanding still incomplete for the support of source code checking parameters
>>> by the make script?
>>>
>>> * Will software analysis be performed in addition to the desired compilation
>>>   of a source file (according to the selected object file)?
>>>
>>> * How do you think about to trigger only the generation of analysis results
>>>   for a single file?
>>
>> Do I need to remove that line from the patch?
> 
> I propose to adjust it another bit.
> The desired change agreement might need further communication efforts.
> 
> 
>> Feel free to submit patches, not just comments.
> 
> Would you like to integrate any more details from the running patch review?

I am satisfied with the current patch.

No doubt that any documentation can be improved, almost ad infinitum,
but I'm not trying to do that. I'm trying not to do that.


-- 
~Randy

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:07               ` Randy Dunlap
@ 2020-07-01 15:15                 ` Markus Elfring
  2020-07-01 15:19                   ` Jonathan Corbet
  2020-07-01 15:15                 ` Markus Elfring
  1 sibling, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 15:15 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>> Would you like to integrate any more details from the running patch review?
>
> I am satisfied with the current patch.

I got an other software development impression.


> No doubt that any documentation can be improved, almost ad infinitum,
> but I'm not trying to do that.

Do we stumble on a target conflict according to a specific technical detail?

How do you think about to compare source code analysis results
from programs like “sparse” and “spatch” (by the mentioned make command)?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:07               ` Randy Dunlap
  2020-07-01 15:15                 ` Markus Elfring
@ 2020-07-01 15:15                 ` Markus Elfring
  2020-07-01 15:19                   ` Randy Dunlap
  1 sibling, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 15:15 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>> Would you like to integrate any more details from the running patch review?
>
> I am satisfied with the current patch.

I got an other software development impression.


> No doubt that any documentation can be improved, almost ad infinitum,
> but I'm not trying to do that.

Do we stumble on a target conflict according to a specific technical detail?

How do you think about to compare source code analysis results
from programs like “sparse” and “spatch” (by the mentioned make command)?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:15                 ` Markus Elfring
@ 2020-07-01 15:19                   ` Jonathan Corbet
  2020-07-01 15:23                     ` Markus Elfring
  0 siblings, 1 reply; 22+ messages in thread
From: Jonathan Corbet @ 2020-07-01 15:19 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Randy Dunlap, linux-doc, Coccinelle, LKML, kernel-janitors,
	Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
	Masahiro Yamada

On Wed, 1 Jul 2020 17:15:07 +0200
Markus Elfring <Markus.Elfring@web.de> wrote:

> >> Would you like to integrate any more details from the running patch review?  
> >
> > I am satisfied with the current patch.  
> 
> I got an other software development impression.

Markus, the patch is fine, we can end this here.

jon

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:15                 ` Markus Elfring
@ 2020-07-01 15:19                   ` Randy Dunlap
  2020-07-01 15:32                     ` Markus Elfring
  2020-07-01 17:32                     ` Markus Elfring
  0 siblings, 2 replies; 22+ messages in thread
From: Randy Dunlap @ 2020-07-01 15:19 UTC (permalink / raw)
  To: Markus Elfring, linux-doc, Coccinelle
  Cc: Michal Marek, Gilles Muller, kernel-janitors, Jonathan Corbet,
	Nicolas Palix, LKML, Julia Lawall

On 7/1/20 8:15 AM, Markus Elfring wrote:
>>> Would you like to integrate any more details from the running patch review?
>>
>> I am satisfied with the current patch.
> 
> I got an other software development impression.
> 
> 
>> No doubt that any documentation can be improved, almost ad infinitum,
>> but I'm not trying to do that.
> 
> Do we stumble on a target conflict according to a specific technical detail?
> 
> How do you think about to compare source code analysis results
> from programs like “sparse” and “spatch” (by the mentioned make command)?

None of that has anything to do with the current patch.

Julia, do you have any comments about the current patch? (v2)

thanks.

-- 
~Randy

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:19                   ` Jonathan Corbet
@ 2020-07-01 15:23                     ` Markus Elfring
  0 siblings, 0 replies; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 15:23 UTC (permalink / raw)
  To: Jonathan Corbet, Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada

>> I got an other software development impression.
>
> Markus, the patch is fine, we can end this here.

Do you care to improve the software documentation any further
according to the specification file extensions for build commands?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:19                   ` Randy Dunlap
@ 2020-07-01 15:32                     ` Markus Elfring
  2020-07-01 17:32                     ` Markus Elfring
  1 sibling, 0 replies; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 15:32 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>> Do we stumble on a target conflict according to a specific technical detail?
>>
>> How do you think about to compare source code analysis results
>> from programs like “sparse” and “spatch” (by the mentioned make command)?
>
> None of that has anything to do with the current patch.

Both analysis tools can (and should be) be invoked according to
the command parameter “CHECK”.
I hope that the relationship to the compilation of a single source file
will be clarified better.

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 15:19                   ` Randy Dunlap
  2020-07-01 15:32                     ` Markus Elfring
@ 2020-07-01 17:32                     ` Markus Elfring
  2020-07-01 19:15                       ` Randy Dunlap
  1 sibling, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 17:32 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

> None of that has anything to do with the current patch.

Did you test the specified make command for the display
of expected data processing results?

How much do you distinguish desired effects according to
the specification of file extensions for such build commands?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 17:32                     ` Markus Elfring
@ 2020-07-01 19:15                       ` Randy Dunlap
  2020-07-01 20:10                         ` Markus Elfring
  0 siblings, 1 reply; 22+ messages in thread
From: Randy Dunlap @ 2020-07-01 19:15 UTC (permalink / raw)
  To: Markus Elfring, linux-doc, Coccinelle
  Cc: Michal Marek, Gilles Muller, kernel-janitors, Jonathan Corbet,
	Nicolas Palix, LKML, Julia Lawall

On 7/1/20 10:32 AM, Markus Elfring wrote:
>> None of that has anything to do with the current patch.
> 
> Did you test the specified make command for the display
> of expected data processing results?

Markus, if something doesn't work, just say so, OK?
Don't go all obtuse on us.

> How much do you distinguish desired effects according to
> the specification of file extensions for such build commands?

I don't grok that.


@Jon, Julia-
I plan to submit a v3 without the addition of "path/to/file.c" in 2 places.


However, I thought that this:
  To apply Coccinelle on a file basis, instead of a directory basis, the
  following command may be used::

    make C=1 CHECK="scripts/coccicheck"

meant that someone could run coccicheck on one source file, but I cannot
get that to work.

Julia, Markus- can you tell me how to run coccicheck on one source file?


Thanks.
-- 
~Randy

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 19:15                       ` Randy Dunlap
@ 2020-07-01 20:10                         ` Markus Elfring
       [not found]                           ` <alpine.DEB.2.22.394.2007012232510.2540@hadrien>
  0 siblings, 1 reply; 22+ messages in thread
From: Markus Elfring @ 2020-07-01 20:10 UTC (permalink / raw)
  To: Randy Dunlap, linux-doc, Coccinelle
  Cc: LKML, kernel-janitors, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Masahiro Yamada, Jonathan Corbet

>> Did you test the specified make command for the display
>> of expected data processing results?
>
> Markus, if something doesn't work, just say so, OK?

Did a previous information fit to this expectation already?
https://lore.kernel.org/linux-doc/c2c1dec0-2bd1-b0e2-1aa4-38d0e954d5ba@web.de/
https://lkml.org/lkml/2020/6/30/492

“…
make: Nothing to be done for 'path/to/file.c'.
…”


> Don't go all obtuse on us.

I am curious if involved communication difficulties can be resolved
better by other means.


>> How much do you distinguish desired effects according to
>> the specification of file extensions for such build commands?
>
> I don't grok that.

I assume that you got used to the handling of specific file suffixes
also for their application together with make scripts.

One part of the discussed software documentation deals with
the combination of compilation and further source code analysis,
doesn't it?


> Julia, Markus- can you tell me how to run coccicheck on one source file?

You can choose between two methods.

* Use the documented build target with appropriate parameters.
  (How many Linux software modules do consist of only a single source file?)

* Do you get further ideas from another concrete command example?
  https://lore.kernel.org/linux-arm-kernel/5b693ee0-0cb1-7ff3-b562-bac6bcb6aae8@web.de/
  https://lkml.org/lkml/2020/6/29/357

  elfring@Sonne:~/Projekte/Linux/next-patched> make J=1 C=1 CHECK='scripts/coccicheck' MODE=context COCCI=~/Projekte/Linux/next-patched/scripts/coccinelle/null/show_pointer_usage_before_null_check-20200701.cocci drivers/usb/mtu3/mtu3_gadget.o

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-01 14:52           ` Randy Dunlap
  2020-07-01 15:02             ` Markus Elfring
@ 2020-07-02  0:08             ` Matthew Wilcox
  2020-07-02  5:40               ` Julia Lawall
  1 sibling, 1 reply; 22+ messages in thread
From: Matthew Wilcox @ 2020-07-02  0:08 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Jonathan Corbet, Michal Marek, linux-doc, Nicolas Palix,
	Gilles Muller, kernel-janitors, LKML, Julia Lawall,
	Markus Elfring, Coccinelle

On Wed, Jul 01, 2020 at 07:52:58AM -0700, Randy Dunlap wrote:
> On 7/1/20 6:32 AM, Markus Elfring wrote:
> >>> How do you think about to use the following command variant
> >>> for the adjustment of the software documentation?
> >>>
> >>> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
> >>
> >> I don't understand the reason for that change...
> 
> IOW, your "patch" needs justification and/or explanation. It was missing that info.

What Markus is trying so completely ineptly to say is that
  make C=1 CHECK=scripts/coccicheck path/to/file.c
doesn't work.  You need to use the .o suffix to check the .c file.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
  2020-07-02  0:08             ` Matthew Wilcox
@ 2020-07-02  5:40               ` Julia Lawall
  0 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2020-07-02  5:40 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Jonathan Corbet, Michal Marek, linux-doc, Nicolas Palix,
	Randy Dunlap, kernel-janitors, LKML, Julia Lawall,
	Markus Elfring, Gilles Muller, Coccinelle



On Thu, 2 Jul 2020, Matthew Wilcox wrote:

> On Wed, Jul 01, 2020 at 07:52:58AM -0700, Randy Dunlap wrote:
> > On 7/1/20 6:32 AM, Markus Elfring wrote:
> > >>> How do you think about to use the following command variant
> > >>> for the adjustment of the software documentation?
> > >>>
> > >>> +    make C=1 CHECK='scripts/coccicheck' 'path/to/file.o'
> > >>
> > >> I don't understand the reason for that change...
> >
> > IOW, your "patch" needs justification and/or explanation. It was missing that info.
>
> What Markus is trying so completely ineptly to say is that
>   make C=1 CHECK=scripts/coccicheck path/to/file.c
> doesn't work.  You need to use the .o suffix to check the .c file.

Thanks Matthew for this very helpful information.

julia

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
       [not found]                           ` <alpine.DEB.2.22.394.2007012232510.2540@hadrien>
@ 2020-07-02  6:01                             ` Markus Elfring
  2020-07-02  8:22                             ` Markus Elfring
  1 sibling, 0 replies; 22+ messages in thread
From: Markus Elfring @ 2020-07-02  6:01 UTC (permalink / raw)
  To: Julia Lawall, Randy Dunlap, Coccinelle, linux-doc
  Cc: kernel-janitors, LKML, Jonathan Corbet, Masahiro Yamada,
	Michal Marek, Nicolas Palix, Gilles Muller

>>> Julia, Markus- can you tell me how to run coccicheck on one source file?
>>
>> You can choose between two methods.
>>
>> * Use the documented build target with appropriate parameters.
>>   (How many Linux software modules do consist of only a single source file?)
>
> This is a useless piece of information.  What are "appropriate parameters".

I propose to take another look at details from the discussed software documentation
for the desired selection of useful settings.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/dev-tools/coccinelle.rst?id=cd77006e01b3198c75fb7819b3d0ff89709539bb#n167

It is mentioned there that the make variable “M” can be used
to apply Coccinelle to a specific directory.

* Which existing directories will contain a single source file for a while?

* You can create folders on demand with one source file (or equivalent
  symbolic links), can't you?


>> * Do you get further ideas from another concrete command example?
>>   https://lore.kernel.org/linux-arm-kernel/5b693ee0-0cb1-7ff3-b562-bac6bcb6aae8@web.de/
>>   https://lkml.org/lkml/2020/6/29/357
>>
>>   elfring@Sonne:~/Projekte/Linux/next-patched> make J=1 C=1 CHECK='scripts/coccicheck' MODE=context COCCI=~/Projekte/Linux/next-patched/scripts/coccinelle/null/show_pointer_usage_before_null_check-20200701.cocci drivers/usb/mtu3/mtu3_gadget.o
>
> This is not what is intended.

I am curious how corresponding intentions will be adjusted.


> What is intended has never worked.

I wonder about this view.
Did I get inappropriate impressions from the presented test example?


> The coccicheck script expects that the file name is received on its command
> line, and that is not the case.  I have asked the person who wrote the
> code if he knows how to fix it.

I am also curious how this area might evolve further.

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [v2] Documentation: Coccinelle: fix typos and command example
       [not found]                           ` <alpine.DEB.2.22.394.2007012232510.2540@hadrien>
  2020-07-02  6:01                             ` Markus Elfring
@ 2020-07-02  8:22                             ` Markus Elfring
  1 sibling, 0 replies; 22+ messages in thread
From: Markus Elfring @ 2020-07-02  8:22 UTC (permalink / raw)
  To: Julia Lawall, Randy Dunlap, Coccinelle, linux-doc
  Cc: kernel-janitors, LKML, Jonathan Corbet, Masahiro Yamada,
	Michal Marek, Nicolas Palix, Gilles Muller

>>   elfring@Sonne:~/Projekte/Linux/next-patched> make J=1 C=1 CHECK='scripts/coccicheck' MODE=context COCCI=~/Projekte/Linux/next-patched/scripts/coccinelle/null/show_pointer_usage_before_null_check-20200701.cocci drivers/usb/mtu3/mtu3_gadget.o
>
> This is not what is intended.  What is intended has never worked.  The
> coccicheck script expects that the file name is received on its command
> line, and that is not the case.

I suggest to take another look at information from the verbose execution variant
for such a command example.

* Do the generated program calls look more appropriate then?

* Are you still missing any relevant data (or corresponding descriptions)?

Regards,
Markus

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-07-02  8:22 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0616dd0c-bb86-be2b-3dc6-1c695a92c3ca@infradead.org>
2020-06-30  8:04 ` [PATCH v2] Documentation: Coccinelle: fix typos and command example Markus Elfring
2020-06-30 12:23 ` Markus Elfring
2020-06-30 15:11   ` Randy Dunlap
2020-07-01 11:56     ` Markus Elfring
2020-07-01 13:20       ` Randy Dunlap
2020-07-01 13:32         ` [v2] " Markus Elfring
2020-07-01 14:52           ` Randy Dunlap
2020-07-01 15:02             ` Markus Elfring
2020-07-01 15:07               ` Randy Dunlap
2020-07-01 15:15                 ` Markus Elfring
2020-07-01 15:19                   ` Jonathan Corbet
2020-07-01 15:23                     ` Markus Elfring
2020-07-01 15:15                 ` Markus Elfring
2020-07-01 15:19                   ` Randy Dunlap
2020-07-01 15:32                     ` Markus Elfring
2020-07-01 17:32                     ` Markus Elfring
2020-07-01 19:15                       ` Randy Dunlap
2020-07-01 20:10                         ` Markus Elfring
     [not found]                           ` <alpine.DEB.2.22.394.2007012232510.2540@hadrien>
2020-07-02  6:01                             ` Markus Elfring
2020-07-02  8:22                             ` Markus Elfring
2020-07-02  0:08             ` Matthew Wilcox
2020-07-02  5:40               ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).