Skip to content

Commit 7d087d0

Browse files
rddunlapJonathan Corbet
authored andcommitted
Documentation: Coccinelle: fix various typos etc.
Fix various typos etc. in dev-tools/coccinelle.rst: - punctuation, grammar, wording Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Julia Lawall <julia.lawall@inria.fr> Link: https://lore.kernel.org/r/def28907-18b9-5b7a-e743-79b0418c946c@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 7303515 commit 7d087d0

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

‎Documentation/dev-tools/coccinelle.rst‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Four basic modes are defined: ``patch``, ``report``, ``context``, and
8585
file:line:column-column: message
8686

8787
- ``context`` highlights lines of interest and their context in a
88-
diff-like style.Lines of interest are indicated with ``-``.
88+
diff-like style. Lines of interest are indicated with ``-``.
8989

9090
- ``org`` generates a report in the Org mode format of Emacs.
9191

@@ -119,7 +119,7 @@ For each semantic patch, a commit message is proposed. It gives a
119119
description of the problem being checked by the semantic patch, and
120120
includes a reference to Coccinelle.
121121

122-
As any static code analyzer, Coccinelle produces false
122+
As with any static code analyzer, Coccinelle produces false
123123
positives. Thus, reports must be carefully checked, and patches
124124
reviewed.
125125

@@ -135,18 +135,18 @@ the parallelism, set the J= variable. For example, to run across 4 CPUs::
135135

136136
make coccicheck MODE=report J=4
137137

138-
As of Coccinelle 1.0.2 Coccinelle uses Ocaml parmap for parallelization,
138+
As of Coccinelle 1.0.2 Coccinelle uses Ocaml parmap for parallelization;
139139
if support for this is detected you will benefit from parmap parallelization.
140140

141141
When parmap is enabled coccicheck will enable dynamic load balancing by using
142-
``--chunksize 1`` argument, this ensures we keep feeding threads with work
142+
``--chunksize 1`` argument. This ensures we keep feeding threads with work
143143
one by one, so that we avoid the situation where most work gets done by only
144144
a few threads. With dynamic load balancing, if a thread finishes early we keep
145145
feeding it more work.
146146

147147
When parmap is enabled, if an error occurs in Coccinelle, this error
148-
value is propagated back, the return value of the ``make coccicheck``
149-
captures this return value.
148+
value is propagated back, and the return value of the ``make coccicheck``
149+
command captures this return value.
150150

151151
Using Coccinelle with a single semantic patch
152152
---------------------------------------------
@@ -183,7 +183,7 @@ To check only newly edited code, use the value 2 for the C flag, i.e.::
183183

184184
make C=2 CHECK="scripts/coccicheck"
185185

186-
In these modes, which works on a file basis, there is no information
186+
In these modes, which work on a file basis, there is no information
187187
about semantic patches displayed, and no commit message proposed.
188188

189189
This runs every semantic patch in scripts/coccinelle by default. The
@@ -198,21 +198,21 @@ Debugging Coccinelle SmPL patches
198198

199199
Using coccicheck is best as it provides in the spatch command line
200200
include options matching the options used when we compile the kernel.
201-
You can learn what these options are by using V=1, you could then
201+
You can learn what these options are by using V=1; you could then
202202
manually run Coccinelle with debug options added.
203203

204204
Alternatively you can debug running Coccinelle against SmPL patches
205-
by asking for stderr to be redirected to stderr, by default stderr
206-
is redirected to /dev/null, if you'd like to capture stderr you
205+
by asking for stderr to be redirected to stderr. By default stderr
206+
is redirected to /dev/null; if you'd like to capture stderr you
207207
can specify the ``DEBUG_FILE="file.txt"`` option to coccicheck. For
208208
instance::
209209

210210
rm -f cocci.err
211211
make coccicheck COCCI=scripts/coccinelle/free/kfree.cocci MODE=report DEBUG_FILE=cocci.err
212212
cat cocci.err
213213

214-
You can use SPFLAGS to add debugging flags, for instance you may want to
215-
add both --profile --show-trying to SPFLAGS when debugging. For instance
214+
You can use SPFLAGS to add debugging flags; for instance you may want to
215+
add both --profile --show-trying to SPFLAGS when debugging. For example
216216
you may want to use::
217217

218218
rm -f err.log
@@ -229,15 +229,15 @@ DEBUG_FILE support is only supported when using coccinelle >= 1.0.2.
229229
--------------------
230230

231231
Coccinelle supports reading .cocciconfig for default Coccinelle options that
232-
should be used every time spatch is spawned, the order of precedence for
232+
should be used every time spatch is spawned. The order of precedence for
233233
variables for .cocciconfig is as follows:
234234

235235
- Your current user's home directory is processed first
236236
- Your directory from which spatch is called is processed next
237237
- The directory provided with the --dir option is processed last, if used
238238

239239
Since coccicheck runs through make, it naturally runs from the kernel
240-
proper dir, as such the second rule above would be implied for picking up a
240+
proper dir; as such the second rule above would be implied for picking up a
241241
.cocciconfig when using ``make coccicheck``.
242242

243243
``make coccicheck`` also supports using M= targets. If you do not supply
@@ -260,13 +260,13 @@ If not using the kernel's coccicheck target, keep the above precedence
260260
order logic of .cocciconfig reading. If using the kernel's coccicheck target,
261261
override any of the kernel's .coccicheck's settings using SPFLAGS.
262262

263-
We help Coccinelle when used against Linux with a set of sensible defaults
263+
We help Coccinelle when used against Linux with a set of sensible default
264264
options for Linux with our own Linux .cocciconfig. This hints to coccinelle
265-
git can be used for ``git grep`` queries over coccigrep. A timeout of 200
265+
that git can be used for ``git grep`` queries over coccigrep. A timeout of 200
266266
seconds should suffice for now.
267267

268268
The options picked up by coccinelle when reading a .cocciconfig do not appear
269-
as arguments to spatch processes running on your system, to confirm what
269+
as arguments to spatch processes running on your system. To confirm what
270270
options will be used by Coccinelle run::
271271

272272
spatch --print-options-only
@@ -290,7 +290,7 @@ given to it when options are in conflict. ::
290290

291291
Coccinelle supports idutils as well but requires coccinelle >= 1.0.6.
292292
When no ID file is specified coccinelle assumes your ID database file
293-
is in the file .id-utils.index on the top level of the kernel, coccinelle
293+
is in the file .id-utils.index on the top level of the kernel. Coccinelle
294294
carries a script scripts/idutils_index.sh which creates the database with::
295295

296296
mkid -i C --output .id-utils.index
@@ -317,7 +317,7 @@ SmPL patch specific options
317317
---------------------------
318318

319319
SmPL patches can have their own requirements for options passed
320-
to Coccinelle. SmPL patch specific options can be provided by
320+
to Coccinelle. SmPL patch-specific options can be provided by
321321
providing them at the top of the SmPL patch, for instance::
322322

323323
// Options: --no-includes --include-headers
@@ -327,7 +327,7 @@ SmPL patch Coccinelle requirements
327327

328328
As Coccinelle features get added some more advanced SmPL patches
329329
may require newer versions of Coccinelle. If an SmPL patch requires
330-
at least a version of Coccinelle, this can be specified as follows,
330+
a minimum version of Coccinelle, this can be specified as follows,
331331
as an example if requiring at least Coccinelle >= 1.0.5::
332332

333333
// Requires: 1.0.5

0 commit comments

Comments
 (0)