public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] documentation: coccinelle: Improve command example for make C={1,2}
@ 2020-08-10 17:59 Sumera Priyadarsini
  2020-08-10 20:05 ` [Cocci] [PATCH v3] documentation: coccinelle: Improve command example for make C={1, 2} Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Sumera Priyadarsini @ 2020-08-10 17:59 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: gregkh, Gilles.Muller, nicolas.palix, michal.lkml, corbet, cocci,
	linux-doc, linux-kernel, Markus.Elfring, Sumera Priyadarsini

Modify coccinelle documentation to further clarify
the usage of the makefile C variable flag by coccicheck.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>

---
Changes in v3:
        - Remove quotes as suggested by Markus Elfring
	- Change in wording, and punctuation, as suggested by Julia Lawall
---
 Documentation/dev-tools/coccinelle.rst | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/Documentation/dev-tools/coccinelle.rst b/Documentation/dev-tools/coccinelle.rst
index 6c791af1c859..74c5e6aeeff5 100644
--- a/Documentation/dev-tools/coccinelle.rst
+++ b/Documentation/dev-tools/coccinelle.rst
@@ -175,13 +175,20 @@ For example, to check drivers/net/wireless/ one may write::
     make coccicheck M=drivers/net/wireless/
 
 To apply Coccinelle on a file basis, instead of a directory basis, the
-following command may be used::
+C variable is used by the makefile to select which files to work with.
+This variable can be used to run scripts for the entire kernel, a
+specific directory, or for a single file.
 
-    make C=1 CHECK="scripts/coccicheck"
+For example, to check drivers/bluetooth/bfusb.c, the value 1 is
+passed to the C variable to check files that make considers
+need to be compiled.::
 
-To check only newly edited code, use the value 2 for the C flag, i.e.::
+    make C=1 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o
 
-    make C=2 CHECK="scripts/coccicheck"
+The value 2 is passed to the C variable to check files regardless of
+whether they need to be compiled or not.::
+
+    make C=2 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o
 
 In these modes, which work on a file basis, there is no information
 about semantic patches displayed, and no commit message proposed.
-- 
2.17.1


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

end of thread, other threads:[~2020-08-11  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <478715f8-87dd-7b4d-d3fd-01585f5f3bd7@web.de>
2020-08-10 20:52 ` [Cocci] [PATCH v3] documentation: coccinelle: Improve command example for make C={1, 2} Julia Lawall
     [not found]   ` <d6dcb49d-3dca-327e-e782-2cae789e31b7@web.de>
2020-08-11  8:24     ` [v3] " Greg Kroah-Hartman
2020-08-10 17:59 [PATCH v3] documentation: coccinelle: Improve command example for make C={1,2} Sumera Priyadarsini
2020-08-10 20:05 ` [Cocci] [PATCH v3] documentation: coccinelle: Improve command example for make C={1, 2} Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox