Linus Torvalds <torvalds@linux-foundation.org> writes:A literally that simple macro, or a complicated one? I'm all for using brackets when there is / could be some possibility of increasing code readability. E.g. I always use parentheses in a nested if-if, because if (x) if (y) a; else c; may be confusing, especially if formatted differently. if (x) a; else if (y) b; etc. is simple and unambiguous and I don't put the braces. So is a case like do x; while (y); It can't be made more clear with brackets. IOW: improving the style is great. Changing it only to silence some tool is not. Right, but they (at least for me) make it more readable. kmalloc(sizeof i) just doesn't look good, the operator looks like a variable name. But there is this return statement. Some people tend to write return (x); I simply write return x; It's clear, and so is a simple do-while. :-) BTW I think I may use sparse differently. I can see false gcc warnings every time the project is being built. OTOH I run sparse only when I have some (almost) completed project (a patch, a driver etc). I make sure the remaining sparse warnings are (from my POV) invalid and it won't spew them on next build again. -- Krzysztof Halasa -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Miller | Re: Slow DOWN, please!!! |
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
| Ingo Molnar | Re: containers (was Re: -mm merge plans for 2.6.23) |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Josip Rodin | bnx2_poll panicking kernel |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 13/37] dccp: Deprecate Ack Ratio sysctl |
