[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] hvmloader: Fixup pci_write* macros



>>> On 15.06.15 at 16:19, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 15/06/15 15:15, Don Slutz wrote:
>> Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx>
>> CC: Don Slutz <dslutz@xxxxxxxxxxx>
> 
> 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));




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.