Re: [PATCH] drivers: block: save return value of pci_find_capability() in u8

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

 



On 12/6/20 6:30 PM, Damien Le Moal wrote:
> On 2020/12/07 10:26, Bjorn Helgaas wrote:
>> On Sun, Dec 06, 2020 at 11:08:14PM +0000, Chaitanya Kulkarni wrote:
>>> On 12/6/20 11:45, Puranjay Mohan wrote:
>>>> Callers of pci_find_capability should save the return value in u8.
>>>> change type of variables from int to u8 to match the specification.
>>>
>>> I did not understand this, pci_find_capability() does not return u8. 
>>>
>>> what is it that we are achieving by changing the variable type ?
>>>
>>> This patch will probably also generate type mismatch warning with
>>>
>>> certain static analyzers.
>>
>> There's a patch pending via the PCI tree to change the return type to
>> u8.  We can do one of:
>>
>>   - Ignore this.  It only changes something on the stack, so no real
>>     space saving and there's no problem assigning the u8 return value
>>     to the "int".
>>
>>   - The maintainer could ack it and I could merge it via the PCI tree
>>     so it happens in the correct order (after the interface change).
> 
> That works for me. But this driver changes generally go through Jens block tree.
> 
> Jens,
> 
> Is this OK with you if Bjorn takes the patch through the PCI tree ?

Yep that's fine, if that makes it easier to handle.

-- 
Jens Axboe




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux