Re: [PATCH] PCI: fix return in pci_bus_add_device

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

 



On 2014/5/29 11:36, Yinghai Lu wrote:
> On Wed, May 28, 2014 at 6:37 PM, Yijing Wang <wangyijing@xxxxxxxxxx> wrote:
>>>> I found some kernel code still check this return value, and I also think return the
>>>> real retval make sense.
>>>
>>> No, that is not right.
>>>
>>> If you look closely,
>>>
>>> device_attach() returns
>>> 1: success
>>> 0: not attached
>>> <0: fail.
>>
>> Hi Yinghai,
>>    Thanks for your explanation.
>> I found all the kernel code to check its return value, only for print a warning for users.
>>
>>
>> So I think we can drop all return checking from calling path
> 
> I prefer this one. as pci_bus_add_device already have
> 
>>         WARN_ON(retval < 0);
> 
> There is no need to print warning message later again.

OK, thanks for your suggestion.
I will send a patchset to clean the unnecessary check in kernel.

Hi Bjorn, please drop this patch.

Thanks!
Yijing.

> 
> 


-- 
Thanks!
Yijing

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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