Re: [bug report] x86/sfi: Enable enumeration of SD devices

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

 



On Tue, 2016-08-30 at 11:18 -0700, Sathyanarayanan Kuppuswamy wrote:

> IMO, Main problem here is, In some scenarios get_platform_data
> returns 
> NULL on error case and in some cases it return NULL for no platform
> data 
> case.

We have possibility of the following scenarios:
1) fatal error (should return error code and fail booting)
2) non-fatal error (prevents certain device to be enumerated, pdata =
NULL)
3) no pdata for the device (not an error! pdata is optional to the
certain driver)
4) pdata != NULL (fully armed device driver)

According to above I doubt we will have many 1) cases. Otherwise pdata =
NULL is okay.

> 
> For example, in following function, returning NULL on gpio_base == -1 
> and when nr >= PCAL9555A_NUM is incorrect. I think in both these 
> scenarios valid behavior is to stop the device creation process. 

Yes, but do _not_ stop processing and booting!

> Creating an i2c device without validi irq number or gpio number is 
> incorrect.
> 
> So after investigating it bit more, I think its more appropriate to
> fix 
> these error cases in device_libs dir. Let me know your comments.

I doubt that is a proper fix. It might be part of the fix in sfi.c where
you somehow distinguish fatal errors from non-fatal.


-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux