<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/checkpatch.pl, branch v3.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-12-11T01:41:12Z</updated>
<entry>
<title>checkpatch: add ability to --fix (coalesce) string fragments on multiple lines</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e4f6ba5eb7facb0dbf2734f5a12033c70f8eb53'/>
<id>urn:sha1:5e4f6ba5eb7facb0dbf2734f5a12033c70f8eb53</id>
<content type='text'>
Add --fix option to coalesce string fragments.

This does not coalesce string fragments that have newline terminations or
are otherwise exempted.

Other miscellanea:

o move all the string tests together.
o fix get_quoted_string function for tab characters
o fix concatination typo

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: add --strict "pointer comparison to NULL" test</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b75ac618df751b927469ddbca63cf151a62f0f9d'/>
<id>urn:sha1:b75ac618df751b927469ddbca63cf151a62f0f9d</id>
<content type='text'>
It seems there are more and more uses of "if (!ptr)" in preference to "if
(ptr == NULL)" so add a --strict test to emit a message when using the
latter form.

This also finds (ptr != NULL).

Fix it too if desired.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: add test for consecutive string fragments</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90ad30e5b2a759333f06eee64e59a0d886d02036'/>
<id>urn:sha1:90ad30e5b2a759333f06eee64e59a0d886d02036</id>
<content type='text'>
Emit a warning when single line string coalescing occurs.

Code that uses compiler string concatenation on a single line like:

    printk("foo" "bar");

is generally better to read concatenated like:

    printk("foobar");

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: add --strict preference for #defines using BIT(foo)</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ab9019184f1de09409434204cb8fbffe8286e00'/>
<id>urn:sha1:0ab9019184f1de09409434204cb8fbffe8286e00</id>
<content type='text'>
Using BIT(foo) and BIT_ULL(bar) is more common now.  Suggest using these
macros over #defines with 1&lt;&lt;value.

Add a --fix option too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: allow certain SI units with three characters</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Julius Werner</name>
<email>jwerner@chromium.org</email>
</author>
<published>2014-12-10T23:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f512357646268451da0d7e1e0100c55df6c8cea6'/>
<id>urn:sha1:f512357646268451da0d7e1e0100c55df6c8cea6</id>
<content type='text'>
Checkpatch flags CamelCase identifiers in strict mode, but it has a
feature to ignore parts with only two characters to allow for SI units
like mV or uA.  Unfortunately, not all SI units fit in two characters, and
not all are lower case followed by upper case.

This patch adds hardcoded detection for frequency and 1024-based size
units (Hz/KHz/MHz/GHz/THz and KiB/MiB/GiB/TiB), since allowing any three
character combinations might be too lenient.  The list can later be
expanded as needed.

Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Acked-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: Add --strict test for function pointer calling style</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea4acbb11e32a2a1e7d80aa3d3039f909647ceee'/>
<id>urn:sha1:ea4acbb11e32a2a1e7d80aa3d3039f909647ceee</id>
<content type='text'>
Peter Hurley wrote:

The use of older function ptr calling style, (*fn)(), makes static
analysis more error-prone; replace with modern fn() style.

So make checkpatch emit a --strict test for that condition.

Update the unnecessary parentheses test for dereferencing
objects at the same time and create a $fix mechanism too.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: reduce MAINTAINERS update message frequency</title>
<updated>2014-12-11T01:41:12Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0d975b1b439c4fef58fbc306c542c94f48bb849'/>
<id>urn:sha1:e0d975b1b439c4fef58fbc306c542c94f48bb849</id>
<content type='text'>
When files are being added/moved/deleted and a patch contains an update to
the MAINTAINERS file, assume it's to update the MAINTAINERS file correctly
and do not emit the "does MAINTAINERS need updating?" message.

Reported by many people.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: try to avoid mask and shift errors</title>
<updated>2014-12-11T01:41:11Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=abb08a53883ed7afbe3f0ac9444805042f473a63'/>
<id>urn:sha1:abb08a53883ed7afbe3f0ac9444805042f473a63</id>
<content type='text'>
Shift has a higher precedence that mask so warn when a mask then shift
operation is done without parentheses around the mask.

This test works well for a right shift, but the left shift is pretty
commonly done correctly so only warn on the right shift.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: fix use via symlink, make missing spelling file non-fatal</title>
<updated>2014-12-11T01:41:11Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-12-10T23:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36061e380618201a558e01d2c2ac6217ea331523'/>
<id>urn:sha1:36061e380618201a558e01d2c2ac6217ea331523</id>
<content type='text'>
Commit 66b47b4a9dad ("checkpatch: look for common misspellings") made it
difficult to use checkpatch via a symlink.

Fix that and make a missing spelling.txt file non-fatal.  Emit a warning
when the spelling.txt file can not be opened.

Reference: http://xkcd.com/1172/

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reported-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Tested-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: improve warning message for "needless if" case</title>
<updated>2014-12-11T01:41:11Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2014-12-10T23:51:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15160f90b8640b7d83ec8cdac64c65403355faa6'/>
<id>urn:sha1:15160f90b8640b7d83ec8cdac64c65403355faa6</id>
<content type='text'>
Add an 'and' to the sentence so that it looks better:

  WARNING: debugfs_remove(NULL) is safe and this check is probably not required

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
