From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=quzibW4iAAXwqQQ48snLC+gnlqQlO3M/5Ui804YBG3A=; b=gaz4c409EZNN+jPExOnUAnW5shRHlVUsqnb9llW6+/SD4q4DFiGbT2S0gjYPjYPEqt E8VGN7LvMCB36Dkidhi6piZuDEkBbdNLOL76dMb6gUHXVTgLkY/A87UClnYVDX0bPNtR BpZUhFHGgOf4sH5cfpf0JgxUah07SXzyjO51lGNF7AYC78bIsHDpgYmSNATRArNSOfLX 54/qotCPsWiFq12eiQtC/oH2FU5MXE7/bzgCRwayuKbQPFTnLK45uPCx8merEHV+wEu0 B0eqHsfXQU/f4vQw1FKLmLjmwaHxA9G7BWRaPfChRetFoAHr02FVlgd6R2p58D8u3vPP yVgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=quzibW4iAAXwqQQ48snLC+gnlqQlO3M/5Ui804YBG3A=; b=RibguuHMicFsJFMqiTYemcgD73K79lKKiunsuXev9jiNY7U7w0EO9TlikYCd9O0G7T b1/AfsDMf0VZMelXQlmsfm2K87IOGutA+j5l8vW6qBe42pdt04gDt0+DyqYFAj21NYLf dTAchVRx/+z29e8i5VD63YgpVl0oBRGswQVl/iRd4OWWmq3e9TU4N3umBPF9B/oWIFvf LzRUZt7gdURVEkU45FpiKqYUJKDmvvFC0r2rGout2i1N596JIn0gjz6rRBsm65sJxNF8 F015ugGJxNIrrpOIkO0eJGfMVm0RCd1NarFzGAWWYB9ZF51YeD+l1oCBDvw7fLqrfzaU O0Lg== X-Gm-Message-State: ALoCoQmPaQx9TWDKP/EugPBdpcUU640OkiakJIb7KuqH5kE8rs5SsOaxxPPCzfOrSATBxs3xDEw5bEitS/ORoQD0oCU+FGLmcA== X-Received: by 10.66.153.198 with SMTP id vi6mr153058072pab.37.1452190758283; Thu, 07 Jan 2016 10:19:18 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id cl3sm56388439pad.11.2016.01.07.10.19.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jan 2016 10:19:18 -0800 (PST) Date: Thu, 7 Jan 2016 10:19:25 -0800 From: Stephen Hemminger To: Santosh Shukla Message-ID: <20160107101925.293062ad@xeon-e3> In-Reply-To: <1452184390-5994-7-git-send-email-sshukla@mvista.com> 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 Subject: Re: [dpdk-dev] [PATCH v3 06/12] eal: pci: vfio: add rd/wr func for pci bar space X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2016 18:19:19 -0000 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