Re: [PATCH v3 4/7] MIPS: ath79: add a common PCI registration function

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

 



Hi Sergei,

2011.11.21. 11:17 keltezéssel, Sergei Shtylyov írta:
> Hello.
> 
> On 21-11-2011 1:39, Gabor Juhos wrote:
> 
>> The current code unconditionally registers the AR724X
>> specific PCI controller, even if the kernel is running
>> on a different SoC.
> 

<...>

>>   }
>> +
>> +int __init ath79_register_pci(void)
>> +{
>> +    int ret;
>> +
>> +    if (soc_is_ar724x())
>> +        ret = ath724x_pcibios_init();
>> +    else
>> +        ret = -ENODEV;
> 
>    Why not return right away and save 4 lines of code?

Because I have more patches which will need the if-else statement. Apart from
that, you are right it is not needed here. I will remove it from the current patch.

-Gabor



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux