From: "Jan Beulich" Subject: Re: [PATCH 1/4] hvmloader: Fixup pci_write* macros Date: Mon, 15 Jun 2015 15:32:46 +0100 Message-ID: <557EFE2E0200007800084F2A@mail.emea.novell.com> References: <1434377752-15705-1-git-send-email-dslutz@verizon.com> <1434377752-15705-2-git-send-email-dslutz@verizon.com> <557EDEE0.9060901@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <557EDEE0.9060901@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: WeiLiu , Ian Campbell , Stefano Stabellini , Ian Jackson , Don Slutz , xen-devel@lists.xen.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 15.06.15 at 16:19, wrote: > On 15/06/15 15:15, Don Slutz wrote: >> Signed-off-by: Don Slutz >> CC: Don Slutz > > Fix how? It looks like you are bracketing val. > > This is an improvement, but please always be specific as to what is > being fixed. > > Furthermore, what about devfn or reg? They explicitly don't need parenthesization, as they're just being forwarded. Jan >> --- a/tools/firmware/hvmloader/util.h >> +++ b/tools/firmware/hvmloader/util.h >> @@ -82,9 +82,9 @@ uint32_t pci_read(uint32_t devfn, uint32_t reg, uint32_t len); >> #define pci_readw(devfn, reg) ((uint16_t)pci_read(devfn, reg, 2)) >> #define pci_readl(devfn, reg) ((uint32_t)pci_read(devfn, reg, 4)) >> void pci_write(uint32_t devfn, uint32_t reg, uint32_t len, uint32_t val); >> -#define pci_writeb(devfn, reg, val) (pci_write(devfn, reg, 1, (uint8_t) > val)) >> -#define pci_writew(devfn, reg, val) (pci_write(devfn, reg, 2, > (uint16_t)val)) >> -#define pci_writel(devfn, reg, val) (pci_write(devfn, reg, 4, > (uint32_t)val)) >> +#define pci_writeb(devfn, reg, val) (pci_write(devfn, reg, 1, (uint8_t) > (val))) >> +#define pci_writew(devfn, reg, val) (pci_write(devfn, reg, 2, > (uint16_t)(val))) >> +#define pci_writel(devfn, reg, val) (pci_write(devfn, reg, 4, > (uint32_t)(val))) >> >> /* Get a pointer to the shared-info page */ >> struct shared_info *get_shared_info(void) __attribute__ ((const));