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

Re: [Xen-devel] [PATCH v4 RFC 1/6] x86/PCI: add config space write abstract intercept logic



>>> On 22.06.15 at 21:31, <konrad.wilk@xxxxxxxxxx> wrote:
>> @@ -1804,8 +1804,12 @@ static bool_t pci_cfg_ok(struct domain *
>>              start |= CF8_ADDR_HI(currd->arch.pci_cf8);
>>      }
>>  
>> -    return !xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
>> -                                      start, start + size - 1, write);
>> +    if ( xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
>> +                                   start, start + size - 1, !!write) != 0 )
>> +         return 0;
>> +
>> +    return !write ||
>> +           pci_conf_write_intercept(0, machine_bdf, start, size, write) >= 
>> 0;
> 
> Won't the 'write' parameter cause an compiler error as it expects an 
> pointer?

No, certainly not - !write means the same as write != NULL, but is
(imo) easier to read.

Jan


_______________________________________________
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®.