From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH vhost] virtio_net: fix build warnings
Date: Mon, 7 Mar 2022 05:00:20 -0500 [thread overview]
Message-ID: <20220307045948-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220307094042.22180-1-xuanzhuo@linux.alibaba.com>
On Mon, Mar 07, 2022 at 05:40:42PM +0800, Xuan Zhuo wrote:
> These warnings appear on some platforms (arm multi_v7_defconfig). This
> patch fixes these warnings.
>
> drivers/net/virtio_net.c: In function 'virtnet_rx_vq_reset':
> drivers/net/virtio_net.c:1823:63: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
> 1823 | "reset rx reset vq fail: rx queue index: %ld err: %d\n",
> | ~~^
> | |
> | long int
> | %d
> 1824 | rq - vi->rq, err);
> | ~~~~~~~~~~~
> | |
> | int
> drivers/net/virtio_net.c: In function 'virtnet_tx_vq_reset':
> drivers/net/virtio_net.c:1873:63: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
> 1873 | "reset tx reset vq fail: tx queue index: %ld err: %d\n",
> | ~~^
> | |
> | long int
> | %d
> 1874 | sq - vi->sq, err);
> | ~~~~~~~~~~~
> | |
> | int
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
I squashed this into the problematic patch. Take a look
at my tree to verify all's well pls.
> ---
> drivers/net/virtio_net.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 1fa2d632a994..4d629d1ea894 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1820,7 +1820,7 @@ static int virtnet_rx_vq_reset(struct virtnet_info *vi,
>
> err:
> netdev_err(vi->dev,
> - "reset rx reset vq fail: rx queue index: %ld err: %d\n",
> + "reset rx reset vq fail: rx queue index: %td err: %d\n",
> rq - vi->rq, err);
> virtnet_napi_enable(rq->vq, &rq->napi);
> return err;
> @@ -1870,7 +1870,7 @@ static int virtnet_tx_vq_reset(struct virtnet_info *vi,
>
> err:
> netdev_err(vi->dev,
> - "reset tx reset vq fail: tx queue index: %ld err: %d\n",
> + "reset tx reset vq fail: tx queue index: %td err: %d\n",
> sq - vi->sq, err);
> virtnet_napi_tx_enable(vi, sq->vq, &sq->napi);
> return err;
> --
> 2.31.0
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: virtualization@lists.linux-foundation.org,
Jason Wang <jasowang@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH vhost] virtio_net: fix build warnings
Date: Mon, 7 Mar 2022 05:00:20 -0500 [thread overview]
Message-ID: <20220307045948-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220307094042.22180-1-xuanzhuo@linux.alibaba.com>
On Mon, Mar 07, 2022 at 05:40:42PM +0800, Xuan Zhuo wrote:
> These warnings appear on some platforms (arm multi_v7_defconfig). This
> patch fixes these warnings.
>
> drivers/net/virtio_net.c: In function 'virtnet_rx_vq_reset':
> drivers/net/virtio_net.c:1823:63: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
> 1823 | "reset rx reset vq fail: rx queue index: %ld err: %d\n",
> | ~~^
> | |
> | long int
> | %d
> 1824 | rq - vi->rq, err);
> | ~~~~~~~~~~~
> | |
> | int
> drivers/net/virtio_net.c: In function 'virtnet_tx_vq_reset':
> drivers/net/virtio_net.c:1873:63: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
> 1873 | "reset tx reset vq fail: tx queue index: %ld err: %d\n",
> | ~~^
> | |
> | long int
> | %d
> 1874 | sq - vi->sq, err);
> | ~~~~~~~~~~~
> | |
> | int
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
I squashed this into the problematic patch. Take a look
at my tree to verify all's well pls.
> ---
> drivers/net/virtio_net.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 1fa2d632a994..4d629d1ea894 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1820,7 +1820,7 @@ static int virtnet_rx_vq_reset(struct virtnet_info *vi,
>
> err:
> netdev_err(vi->dev,
> - "reset rx reset vq fail: rx queue index: %ld err: %d\n",
> + "reset rx reset vq fail: rx queue index: %td err: %d\n",
> rq - vi->rq, err);
> virtnet_napi_enable(rq->vq, &rq->napi);
> return err;
> @@ -1870,7 +1870,7 @@ static int virtnet_tx_vq_reset(struct virtnet_info *vi,
>
> err:
> netdev_err(vi->dev,
> - "reset tx reset vq fail: tx queue index: %ld err: %d\n",
> + "reset tx reset vq fail: tx queue index: %td err: %d\n",
> sq - vi->sq, err);
> virtnet_napi_tx_enable(vi, sq->vq, &sq->napi);
> return err;
> --
> 2.31.0
next prev parent reply other threads:[~2022-03-07 10:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 9:40 [PATCH vhost] virtio_net: fix build warnings Xuan Zhuo
2022-03-07 9:40 ` Xuan Zhuo
2022-03-07 10:00 ` Michael S. Tsirkin [this message]
2022-03-07 10:00 ` Michael S. Tsirkin
2022-03-07 10:04 ` Xuan Zhuo
2022-03-07 10:04 ` Xuan Zhuo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220307045948-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.