From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH v5 2/2] virtio: fix PCI config err handling Date: Tue, 28 Aug 2018 11:14:21 +0100 Message-ID: <1535451261.1113.1.camel@debian.org> References: <20180824171420.31246-1-bluca@debian.org> <20180827165240.28322-1-bluca@debian.org> <20180827165240.28322-2-bluca@debian.org> <20180828064353.GA80296@fbsd.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com, bruce.richardson@intel.com, Brian Russell To: Tiwei Bie Return-path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 6BE192C72 for ; Tue, 28 Aug 2018 12:14:23 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id c14-v6so1315653wmb.4 for ; Tue, 28 Aug 2018 03:14:23 -0700 (PDT) In-Reply-To: <20180828064353.GA80296@fbsd.sh.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 2018-08-28 at 14:43 +0800, Tiwei Bie wrote: > I just noticed the title. It should be "net/virtio: xxx", > instead of "virtio: xxx". Fixed > On Mon, Aug 27, 2018 at 05:52:40PM +0100, Luca Boccassi wrote: > [...] > > + ret =3D rte_pci_read_config(dev, &flags, > > sizeof(flags), > > + pos + sizeof(cap)); > > + if (ret !=3D sizeof(flags)) { > > + PMD_INIT_LOG(DEBUG, > > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"failed to read pci > > cap at pos:" > > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0" %lx ret %d", pos + > > sizeof(cap), > > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ret); >=20 > In file included from drivers/net/virtio/virtio_pci.c:15:0: > drivers/net/virtio/virtio_pci.c: In function =E2=80=98vtpci_msix_detect= =E2=80=99: > drivers/net/virtio/virtio_logs.h:13:3: error: format =E2=80=98%lx=E2=80= =99 expects > argument of type =E2=80=98long unsigned int=E2=80=99, but argument 5 has = type > =E2=80=98unsigned int=E2=80=99 [-Werror=3Dformat=3D] > =C2=A0=C2=A0=C2=A0"%s(): " fmt "\n", __func__, ##args) > =C2=A0=C2=A0=C2=A0^ > drivers/net/virtio/virtio_pci.c:737:5: note: in expansion of macro > =E2=80=98PMD_INIT_LOG=E2=80=99 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0PMD_INIT_LOG(DEBUG, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^ > cc1: all warnings being treated as errors >=20 > I got above build issues in 32bit build. >=20 >=20 > Apart from that, >=20 > Reviewed-by: Tiwei Bie >=20 > Thanks! So the 32 and 64 bit builds want opposite things, due to the sizeof type. I changed it to avoid sizeof and just calculate it like in every other prints of these functions to avoid the issue. --=20 Kind regards, Luca Boccassi