latest checkpatch.pl works really well on sched.c.
there's only one problem left, this bogus false positive warning
reappeared:
WARNING: braces {} are not necessary for single statement blocks
#5710: FILE: sched.c:5710:
+ if (parent->groups == parent->groups->next) {
+ pflags &= ~(SD_LOAD_BALANCE |
+ SD_BALANCE_NEWIDLE |
+ SD_BALANCE_FORK |
+ SD_BALANCE_EXEC |
+ SD_SHARE_CPUPOWER |
+ SD_SHARE_PKG_RESOURCES);
+ }
(there's another place in sched.c that trips this up too.)
i think it has been pointed out numerous times that it is perfectly fine
to use curly braces for multi-line single-statement blocks. That
includes simple cases like this too:
if (x) {
/* do y() */
y();
}
it's perfectly legitimate, in fact more robust. So if checkpatch.pl
wants to make any noise about such constructs it should warn about the
_lack_ of curly braces in every multi-line condition block _except_ the
only safe single-line statement:
if (x)
y();
thanks,
Ingo
-
| Andreas Gruenbacher | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
| Alan Cox | Re: [patch 7/8] fdmap v2 - implement sys_socket2 |
| Jens Axboe | Re: regression: CD burning (k3b) went broke |
| Paul E. McKenney | Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures |
git: | |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| David Miller | [GIT]: Networking |
| Alexey Dobriyan | [PATCH 09/33] netns ct: per-netns /proc/net/nf_conntrack, /proc/net/stat/nf_conntr... |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
