]> git.baikalelectronics.ru Git - kernel.git/commit
s2io: Fix warnings due to -Wunused-but-set-variable.
authorDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2011 23:00:00 +0000 (16:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Apr 2011 18:21:30 +0000 (11:21 -0700)
commit16d09b7497423da88599095fbef459c24494d69b
treed70019b7c94d333c84ce3610186c8cff23b635d2
parenta63a7e39a6f5fa919d6674df7ffc278842b87ece
s2io: Fix warnings due to -Wunused-but-set-variable.

Most of these are cases where we are trying to read back a register
after a write to ensure completion.

Simply pre-fixing the readl() or readq() with "(void)" is sufficient
because these are volatile operations and the compiler cannot eliminate
them just because no real assignment takes place.

The case of free_rxd_blk()'s assignments to "struct buffAdd *ba" is a
real spurious assignment as this variable is completely otherwise
unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jon Mason <jdmason@kudzu.us>
drivers/net/s2io.c
drivers/net/s2io.h