aboutsummaryrefslogtreecommitdiffstats
path: root/net/tls/tls_main.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <[email protected]>2022-05-18 09:04:19 +0000
committerDavid S. Miller <[email protected]>2022-05-18 13:13:09 +0000
commita3641ca416a3da7cbeae5bcf1fc26ba9797a1438 (patch)
treec8179354c870cb1c13917ee899d114cd2572e85a /net/tls/tls_main.c
parentnet: ethernet: sunplus: add missing of_node_put() in spl2sw_mdio_init() (diff)
downloadkernel-a3641ca416a3da7cbeae5bcf1fc26ba9797a1438.tar.gz
kernel-a3641ca416a3da7cbeae5bcf1fc26ba9797a1438.zip
net: smc911x: Fix min() use in debug code
If ENABLE_SMC_DEBUG_PKTS=1: drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_hardware_send_pkt’: include/linux/minmax.h:20:28: error: comparison of distinct pointer types lacks a cast [-Werror] 20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^~ drivers/net/ethernet/smsc/smc911x.c:483:17: note: in expansion of macro ‘min’ 483 | PRINT_PKT(buf, min(len, 64)); Fix this by making the constant unsigned, to match the type of "len". While at it, replace the other missed ternary operator by min(), too. Convert the dummy PRINT_PKT() from a macro to a static inline function, to catch mistakes like this without having to enable debug options manually. Fixes: 5ff0348b7f755aac ("net: smc911x: replace ternary operator with min()") Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tls/tls_main.c')
0 files changed, 0 insertions, 0 deletions