aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2016-01-29 11:39:14 +0000
committerDavid S. Miller <[email protected]>2016-01-30 04:33:39 +0000
commit8bdb290896d2ff22942c9c9f5bf19909329f3664 (patch)
tree6e29b42ed69a5248d89a33a54844c7c25b16cd8b /net/switchdev/switchdev.c
parentnet: vxge: avoid unused function warnings (diff)
downloadkernel-8bdb290896d2ff22942c9c9f5bf19909329f3664.tar.gz
kernel-8bdb290896d2ff22942c9c9f5bf19909329f3664.zip
net: nb8800: avoid uninitialized variable warning
The nb8800_poll() function initializes the 'next' variable in the loop looking for new input data. We know this will be called at least once because 'budget' is a guaranteed to be a positive number when we enter the function, but the compiler doesn't know that and warns when the variable is used later: drivers/net/ethernet/aurora/nb8800.c: In function 'nb8800_poll': drivers/net/ethernet/aurora/nb8800.c:350:21: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized] Changing the 'while() {}' loop to 'do {} while()' makes it obvious to the compiler what is going on so it no longer warns. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Mans Rullgard <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions