lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1646647482.2340114-1-xuanzhuo@linux.alibaba.com>
Date:   Mon, 7 Mar 2022 18:04:42 +0800
From:   Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     virtualization@...ts.linux-foundation.org,
        Jason Wang <jasowang@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH vhost] virtio_net: fix build warnings

On Mon, 7 Mar 2022 05:00:20 -0500, "Michael S. Tsirkin" <mst@...hat.com> wrote:
> 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@...b.auug.org.au>
> > Signed-off-by: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
>
> I squashed this into the problematic patch. Take a look
> at my tree to verify all's well pls.

LGTM.

Thanks.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ