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

Configure Feed

Select the types of activity you want to include in your feed.

nfp: flower: fix size_t compile warning

A recent addition to NFP introduced a function that formats a string with
a size_t variable. This is formatted with %ld which is fine on 64-bit
architectures but produces a compile warning on 32-bit architectures.

Fix this by using the z length modifier.

Fixes: a6156a6ab0f9 ("nfp: flower: handle merge hint messages")
Signed-off-by: John Hurley <john.hurley@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

John Hurley and committed by
David S. Miller
7d26c960 5c2e6e14

+1 -1
+1 -1
drivers/net/ethernet/netronome/nfp/flower/cmsg.c
··· 217 217 flow_cnt = msg->count + 1; 218 218 219 219 if (msg_len < struct_size(msg, flow, flow_cnt)) { 220 - nfp_flower_cmsg_warn(app, "Merge hint ctrl msg too short - %d bytes but expect %ld\n", 220 + nfp_flower_cmsg_warn(app, "Merge hint ctrl msg too short - %d bytes but expect %zd\n", 221 221 msg_len, struct_size(msg, flow, flow_cnt)); 222 222 return; 223 223 }