* [PATCH] ixen-netback: fix trivial printf format build warning
@ 2014-03-26 3:56 SeongJae Park
2014-03-26 10:09 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: SeongJae Park @ 2014-03-26 3:56 UTC (permalink / raw)
To: trivial, ian.campbell, wei.liu2
Cc: xen-devel, linux-kernel, netdev, SeongJae Park
Fix following trivial build warning:
drivers/net/xen-netback/netback.c: In function ‘xenvif_tx_dealloc_action’:
drivers/net/xen-netback/netback.c:1585:8: warning:
format ‘%x’ expects argument of type
‘unsigned int’, but argument 3 has type ‘long int’ [-Wformat=]
gop - vif->tx_unmap_ops, ret);
^
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
drivers/net/xen-netback/netback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 5a8c4a4..90001b3 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1574,7 +1574,7 @@ static inline void xenvif_tx_dealloc_action(struct xenvif *vif)
vif->pages_to_unmap,
gop - vif->tx_unmap_ops);
if (ret) {
- netdev_err(vif->dev, "Unmap fail: nr_ops %x ret %d\n",
+ netdev_err(vif->dev, "Unmap fail: nr_ops %lx ret %d\n",
gop - vif->tx_unmap_ops, ret);
for (i = 0; i < gop - vif->tx_unmap_ops; ++i) {
if (gop[i].status != GNTST_okay)
--
1.8.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ixen-netback: fix trivial printf format build warning
2014-03-26 3:56 [PATCH] ixen-netback: fix trivial printf format build warning SeongJae Park
@ 2014-03-26 10:09 ` Ian Campbell
2014-03-26 10:34 ` SeongJae Park
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-03-26 10:09 UTC (permalink / raw)
To: SeongJae Park; +Cc: trivial, wei.liu2, xen-devel, linux-kernel, netdev
On Wed, 2014-03-26 at 12:56 +0900, SeongJae Park wrote:
> Fix following trivial build warning:
>
> drivers/net/xen-netback/netback.c: In function ‘xenvif_tx_dealloc_action’:
> drivers/net/xen-netback/netback.c:1585:8: warning:
> format ‘%x’ expects argument of type
> ‘unsigned int’, but argument 3 has type ‘long int’ [-Wformat=]
> gop - vif->tx_unmap_ops, ret);
> ^
>
> Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Thanks but davem indicated overnight that he has already pushed a
suitable fix to net-next.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ixen-netback: fix trivial printf format build warning
2014-03-26 10:09 ` Ian Campbell
@ 2014-03-26 10:34 ` SeongJae Park
2014-03-26 18:46 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: SeongJae Park @ 2014-03-26 10:34 UTC (permalink / raw)
To: Ian Campbell
Cc: trivial, wei.liu2, xen-devel, linux-kernel@vger.kernel.org,
netdev
Thank you for let me know kindly :)
On Wed, Mar 26, 2014 at 7:09 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Wed, 2014-03-26 at 12:56 +0900, SeongJae Park wrote:
>> Fix following trivial build warning:
>>
>> drivers/net/xen-netback/netback.c: In function ‘xenvif_tx_dealloc_action’:
>> drivers/net/xen-netback/netback.c:1585:8: warning:
>> format ‘%x’ expects argument of type
>> ‘unsigned int’, but argument 3 has type ‘long int’ [-Wformat=]
>> gop - vif->tx_unmap_ops, ret);
>> ^
>>
>> Signed-off-by: SeongJae Park <sj38.park@gmail.com>
>
> Thanks but davem indicated overnight that he has already pushed a
> suitable fix to net-next.
>
> Ian.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ixen-netback: fix trivial printf format build warning
2014-03-26 10:34 ` SeongJae Park
@ 2014-03-26 18:46 ` David Miller
2014-03-26 18:51 ` SeongJae Park
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2014-03-26 18:46 UTC (permalink / raw)
To: sj38.park
Cc: Ian.Campbell, trivial, wei.liu2, xen-devel, linux-kernel, netdev
From: SeongJae Park <sj38.park@gmail.com>
Date: Wed, 26 Mar 2014 19:34:21 +0900
> Thank you for let me know kindly :)
Also your fix wasn't correct.
You changed the code to use %lx but the type isn't a long.
It's the difference between two pointers, which is ptrdiff_t. The
proper printf format string for a hexadecimal ptrdiff_t is %tx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ixen-netback: fix trivial printf format build warning
2014-03-26 18:46 ` David Miller
@ 2014-03-26 18:51 ` SeongJae Park
0 siblings, 0 replies; 5+ messages in thread
From: SeongJae Park @ 2014-03-26 18:51 UTC (permalink / raw)
To: David Miller
Cc: Ian.Campbell, trivial, wei.liu2, xen-devel,
linux-kernel@vger.kernel.org, netdev
On Thu, Mar 27, 2014 at 3:46 AM, David Miller <davem@davemloft.net> wrote:
> From: SeongJae Park <sj38.park@gmail.com>
> Date: Wed, 26 Mar 2014 19:34:21 +0900
>
>> Thank you for let me know kindly :)
>
> Also your fix wasn't correct.
>
> You changed the code to use %lx but the type isn't a long.
>
> It's the difference between two pointers, which is ptrdiff_t. The
> proper printf format string for a hexadecimal ptrdiff_t is %tx
You're right. Thanks for pointing that.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-26 18:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 3:56 [PATCH] ixen-netback: fix trivial printf format build warning SeongJae Park
2014-03-26 10:09 ` Ian Campbell
2014-03-26 10:34 ` SeongJae Park
2014-03-26 18:46 ` David Miller
2014-03-26 18:51 ` SeongJae Park
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).