From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 06/12] eal: pci: vfio: add rd/wr func for pci bar space Date: Thu, 7 Jan 2016 10:19:25 -0800 Message-ID: <20160107101925.293062ad@xeon-e3> References: <1452184390-5994-1-git-send-email-sshukla@mvista.com> <1452184390-5994-7-git-send-email-sshukla@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Santosh Shukla Return-path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id DE0559224 for ; Thu, 7 Jan 2016 19:19:18 +0100 (CET) Received: by mail-pa0-f47.google.com with SMTP id cy9so264520302pac.0 for ; Thu, 07 Jan 2016 10:19:18 -0800 (PST) In-Reply-To: <1452184390-5994-7-git-send-email-sshukla@mvista.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 7 Jan 2016 22:03:03 +0530 Santosh Shukla wrote: > > +int rte_eal_pci_read_bar(const struct rte_pci_device *device __rte_unused, > + void *buf __rte_unused, > + size_t len __rte_unused, > + off_t offset __rte_unused, > + int bar_idx __rte_unused) > +{ > +#ifdef VFIO_PRESENT > + const struct rte_intr_handle *intr_handle = &device->intr_handle; > + return pci_vfio_read_bar(intr_handle, buf, len, offset, bar_idx); > +#else > + return 0; /* UIO's not applicable */ > +#endif > +} It seems wrong to declare all the parameters as unused but then use them. Maybe there is a way to have a macro for USED(x) in the #else case