On 9/20/23 05:49, Roger Pau Monné wrote:
> On Tue, Aug 29, 2023 at 11:19:43PM +0000, Volodymyr Babchuk wrote:
>> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
>> index e58bbdf68d..e96d7b2b37 100644
>> --- a/xen/drivers/vpci/header.c
>> +++ b/xen/drivers/vpci/header.c
>> +static uint32_t cf_check empty_bar_read(const struct pci_dev *pdev,
>> +                                        unsigned int reg, void *data)
>> +{
>> +    return 0;
>> +}
> 
> If we are going to gain a lot of helpers that return a fixed value it
> might be worthwhile to introduce a helper that returns what gets
> passed as 'data'.  Let's leave it as you propose for now.

For future reference, I introduce such a helper in the vPCI capabilities 
filtering series [1]. If that series happens gets committed before this one, it 
could be worthwhile making the switch. But since the helper is not upstream 
yet, +1 for leaving as is for now.

[1] https://lists.xenproject.org/archives/html/xen-devel/2023-09/msg00796.html

Reply via email to