public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Checkpatch false positive?
@ 2009-01-27 15:49 Jan Kara
  2009-01-27 16:06 ` Adrian Bunk
  2009-01-27 16:19 ` Arjan van de Ven
  0 siblings, 2 replies; 9+ messages in thread
From: Jan Kara @ 2009-01-27 15:49 UTC (permalink / raw)
  To: apw; +Cc: linux-kernel

  Hi,

  I've used checkpatch.pl to verify one of my patches. It complains:

ERROR: trailing statements should be on next line
#167: FILE: fs/quota/quota_tree.c:249:
+       for (i = 0, ddquot = buf + sizeof(struct qt_disk_dqdbheader);
[...]
             i++, ddquot += info->dqi_entry_size);

  But the code looks like:
        for (i = 0, ddquot = buf + sizeof(struct qt_disk_dqdbheader);
             i < qtree_dqstr_in_blk(info) && !qtree_entry_unused(info, ddquot);
             i++, ddquot += info->dqi_entry_size);

  Which is IMHO correct. Maybe it's because the for has actually empty body
and the ; is at the end of the line with for. But I didn't find anything in
CodingStyle that would forbid
	for (...);
and
	for (...)
		;
Looks a bit strange.

									Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Checkpatch false positive?
@ 2008-08-01  4:51 Matthew Helsley
  2008-08-03 22:18 ` Andy Whitcroft
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Helsley @ 2008-08-01  4:51 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Randy Dunlap, Joel Schopp, Linux Kernel Mailing List

Hello checkpatch.pl maintainers,

	I'm adding a new thread flag and I get this apparent checkpatch false
positive:


ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture>
#36: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_32.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture>
#63: +++ linux-2.6.27-rc1-mm1/arch/sparc/include/asm/thread_info_64.h

ERROR: do not modify files in include/asm, change architecture specific files in include/asm-<architecture>
#289: +++ linux-2.6.27-rc1-mm1/arch/parisc/include/asm/thread_info.h

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch total: 3 errors, 0 warnings, 214 lines checked

patches/0001-Container-Freezer-Add-TIF_FREEZE-flag-to-all-archit.patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


	Which happens for every arch where the file has been moved under the
arch/ directory (sparc and parisc so far). Should this check for
arch/<foo>/include/asm before giving an ERROR? Should
arch/<foo>/include/asm only trigger a WARNING in this case?

Cheers,
	-Matt Helsley


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

end of thread, other threads:[~2009-01-28  9:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 15:49 Checkpatch false positive? Jan Kara
2009-01-27 16:06 ` Adrian Bunk
2009-01-27 16:34   ` Jan Kara
2009-01-28  9:35   ` Andy Whitcroft
2009-01-27 16:19 ` Arjan van de Ven
2009-01-27 16:33   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2008-08-01  4:51 Matthew Helsley
2008-08-03 22:18 ` Andy Whitcroft
2008-08-04 22:10   ` Matt Helsley

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