Re: [PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-11 Thread David Howells
Andrew Morton [EMAIL PROTECTED] wrote: Yes, it's a shame that there doesn't seem to be a fine-grained way of turning on -W's useful bits. You can turn off -W's undesirable bits. For net/rxrpc/ and fs/afs/ at least, adding: CFLAGS += -W -Wno-unused-parameter to the Makefile generates

Re: [PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-11 Thread David Howells
Andrew Morton [EMAIL PROTECTED] wrote: More than one would expect, given that it is recommended in Documentation/SubmitChecklist, which everyone reads ;) Which states incorrectly: | 22: Newly-added code has been compiled with `gcc -W'. This will generate | lots of noise, but is good for

Re: [PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-11 Thread Andrew Morton
On Fri, 11 May 2007 10:49:23 +0100 David Howells [EMAIL PROTECTED] wrote: Andrew Morton [EMAIL PROTECTED] wrote: Following bug was uncovered by compiling with '-W' flag: gcc -W finds a number of fairly scary bugs. Do you mean in my code specifically? Or in the kernel in general?

[PATCH 1/2] AFS: Fix interminable loop in afs_write_back_from_locked_page()

2007-05-10 Thread David Howells
Following bug was uncovered by compiling with '-W' flag: CC [M] fs/afs/write.o fs/afs/write.c: In function ‘afs_write_back_from_locked_page’: fs/afs/write.c:398: warning: comparison of unsigned expression = 0 is always true Loop variable 'n' is unsigned, so wraps around happily as far as I