summaryrefslogtreecommitdiff
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-03-24 22:19:40 +0100
committerBen Hutchings <ben@decadent.org.uk>2016-08-22 22:37:53 +0100
commit84fb87cb3ee0c1208977e70b8a92b129f4ea828b (patch)
tree0eaa8e4df2475dd6a3f2bd6c6c8484bf6b3a7891 /include/linux/socket.h
parenta3fc1dcf89c543f6bc084f43b29c42d3c9cd4058 (diff)
driver-core: use 'dev' argument in dev_dbg_ratelimited stub
commit 1f62ff34a90471d1b735bac2c79e894afc7c59bc upstream. dev_dbg_ratelimited() is a macro that ignores its first argument when DEBUG is not set, which can lead to unused variable warnings: ethernet/mellanox/mlxsw/pci.c: In function 'mlxsw_pci_cqe_sdq_handle': ethernet/mellanox/mlxsw/pci.c:646:18: warning: unused variable 'pdev' [-Wunused-variable] ethernet/mellanox/mlxsw/pci.c: In function 'mlxsw_pci_cqe_rdq_handle': ethernet/mellanox/mlxsw/pci.c:671:18: warning: unused variable 'pdev' [-Wunused-variable] The macro already ensures that all its other arguments are silently ignored by the compiler without triggering a warning, through the use of the no_printk() macro, but the dev argument is not passed into that. This changes the definition to use the same trick as no_printk() with an if(0) that leads the compiler to not evaluate the side-effects but still see that 'dev' might not be unused. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Suggested-by: Andrew Lunn <andrew@lunn.ch> Fixes: 6f586e663e3b ("driver-core: Shut up dev_dbg_reatelimited() without DEBUG") Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/linux/socket.h')
0 files changed, 0 insertions, 0 deletions