Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atm: eni: Move semicolon to a new line after empty for loop

Clang warns:

drivers/atm/eni.c:244:48: error: for loop has empty body
[-Werror,-Wempty-body]
for (order = 0; (1 << order) < *size; order++);
^
drivers/atm/eni.c:244:48: note: put the semicolon on a separate line to
silence this warning

In this case, that loop is expected to be empty so silence the warning
in the way that Clang suggests.

Link: https://github.com/ClangBuiltLinux/linux/issues/42
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nathan Chancellor and committed by
David S. Miller
3e73cc5c d93adca7

+2 -1
+2 -1
drivers/atm/eni.c
··· 241 241 len = eni_dev->free_len; 242 242 if (*size < MID_MIN_BUF_SIZE) *size = MID_MIN_BUF_SIZE; 243 243 if (*size > MID_MAX_BUF_SIZE) return NULL; 244 - for (order = 0; (1 << order) < *size; order++); 244 + for (order = 0; (1 << order) < *size; order++) 245 + ; 245 246 DPRINTK("trying: %ld->%d\n",*size,order); 246 247 best_order = 65; /* we don't have more than 2^64 of anything ... */ 247 248 index = 0; /* silence GCC */