ASSERT() -> BUG_ON() (2/4): drivers/parisc/sba_iommu.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Grant Grundler
I'm rejecting this patch because of this.
I write (0 == foo) to avoid "foo = 0" mistakes.
GCC warns about this.
$ gcc -Wall test.c
test.c: In function `main':
test.c:3: warning: suggest parentheses around assignment used as truth value
$ cat test.c
int main(int argc, char **argv)
{
if (argc = 1)
return 1;
return 0;
}So I think this is an invalid objection.
Signature · 10 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain _______________________________________________ parisc-linux mailing list [email protected] http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
Quoted 1 line · Matthew Wilcox
GCC warns about this.
Ok - I didn't know that.
Thanks for pointing this out.
I expect it wouldn't generate warnings in this case because arguments to macros typically have extra parens around them. But in general, I can stop doing this for kernel code since -Wall is on.
Quoted 1 line
So I think this is an invalid objection.
Agreed. I'll change the offending code.
thanks,
grant
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux