On 10/23/12 09:51, Ohad Ben-Cohen wrote:
> On Tue, Oct 23, 2012 at 9:37 AM, Igor Grinberg <grinb...@compulab.co.il> 
> wrote:
>>> +     ret = wl12xx_set_platform_data(wlan_data);
>>> +     /* bail out silently in case wl12xx isn't configured */
>>> +     if (ret == -ENOSYS)
>>> +             return ret;
>>
>> Since we have the function ifdef'ed, I don't think we need
>> the ENOSYS check, do we?
> 
> If we want to be strict, we better not remove it.
> 
> It's an interface that hides the internal implementation, and it's
> just better not to assume anything beyond the return values and their
> meanings. This way if WLAN folks change something in the future, we
> don't need to update all the boards code again.

Well, with this argument, we can add this (and many other checks) to
many more places in the code...
I just wanted to point out that most probably ret == -ENOSYS will
never happen since the #ifdef is added, but no problem from my side,
it does not hurt to have 4 more lines just in case, right?

Thanks for the patch and the explanation!

You have my ack already...

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

Reply via email to