From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa1QN-0002Hi-Ul for qemu-devel@nongnu.org; Fri, 03 Oct 2014 07:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa1QE-0004WF-UG for qemu-devel@nongnu.org; Fri, 03 Oct 2014 07:53:27 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:47624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa1QE-0004Tw-NU for qemu-devel@nongnu.org; Fri, 03 Oct 2014 07:53:18 -0400 Received: by mail-wi0-f173.google.com with SMTP id fb4so2513123wid.12 for ; Fri, 03 Oct 2014 04:53:17 -0700 (PDT) Date: Fri, 3 Oct 2014 13:53:13 +0200 From: Marc =?UTF-8?B?TWFyw60=?= Message-ID: <20141003135313.347ad73f@crunchbang> In-Reply-To: <20141002120225.GA29693@stefanha-thinkpad.redhat.com> References: <1409847879-9783-1-git-send-email-marc.mari.barcelo@gmail.com> <1409847879-9783-2-git-send-email-marc.mari.barcelo@gmail.com> <20141002120225.GA29693@stefanha-thinkpad.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/3] libqos: Remove PCI assumptions in virtio driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Paolo Bonzini , qemu-devel@nongnu.org El Thu, 2 Oct 2014 13:02:25 +0100 Stefan Hajnoczi escribi=C3=B3: > On Thu, Sep 04, 2014 at 06:24:37PM +0200, Marc Mar=C3=AD wrote: > > @@ -60,25 +60,25 @@ static void > > qvirtio_pci_assign_device(QVirtioDevice *d, void *data) *vpcidev =3D > > (QVirtioPCIDevice *)d; } > > =20 > > -static uint8_t qvirtio_pci_config_readb(QVirtioDevice *d, void > > *addr) +static uint8_t qvirtio_pci_config_readb(QVirtioDevice *d, > > uint64_t addr) { > > QVirtioPCIDevice *dev =3D (QVirtioPCIDevice *)d; > > - return qpci_io_readb(dev->pdev, addr); > > + return qpci_io_readb(dev->pdev, (void *)addr); >=20 > You do not need casts in C for void* to any pointer type or any > pointer type to void*. Please drop them. addr is of type uint64_t, not a pointer. So if there's no cast it will fail to compile (expected =E2=80=98void *=E2=80=99 but argument is of type = =E2=80=98uint64_t=E2=80=99) Marc