netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] nfp: flower: fix size_t compile warning
@ 2019-04-18  0:05 John Hurley
  2019-04-19 18:56 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: John Hurley @ 2019-04-18  0:05 UTC (permalink / raw)
  To: davem, jakub.kicinski, simon.horman; +Cc: netdev, oss-drivers, John Hurley

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>
---
 drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
index 2054a2f..7faec68 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
@@ -217,7 +217,7 @@ nfp_flower_cmsg_merge_hint_rx(struct nfp_app *app, struct sk_buff *skb)
 	flow_cnt = msg->count + 1;
 
 	if (msg_len < struct_size(msg, flow, flow_cnt)) {
-		nfp_flower_cmsg_warn(app, "Merge hint ctrl msg too short - %d bytes but expect %ld\n",
+		nfp_flower_cmsg_warn(app, "Merge hint ctrl msg too short - %d bytes but expect %zd\n",
 				     msg_len, struct_size(msg, flow, flow_cnt));
 		return;
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next 1/1] nfp: flower: fix size_t compile warning
  2019-04-18  0:05 [PATCH net-next 1/1] nfp: flower: fix size_t compile warning John Hurley
@ 2019-04-19 18:56 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-19 18:56 UTC (permalink / raw)
  To: john.hurley; +Cc: jakub.kicinski, simon.horman, netdev, oss-drivers

From: John Hurley <john.hurley@netronome.com>
Date: Thu, 18 Apr 2019 01:05:39 +0100

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-19 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18  0:05 [PATCH net-next 1/1] nfp: flower: fix size_t compile warning John Hurley
2019-04-19 18:56 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).