[U-Boot] [PATCH v2 10/22] spi: Add error checking for invalid bus widths

Simon Glass sjg at chromium.org
Fri Nov 25 20:38:46 CET 2016


Hi,

On 25 November 2016 at 09:59, Fabio Estevam <festevam at gmail.com> wrote:
> On Fri, Nov 25, 2016 at 2:57 PM, Jagan Teki <jagan at openedev.com> wrote:
>
>> Yeah, ie what if dts has a wrong value and do print that and continue
>> with default width, so-that the user will update this for next run.
>> Since it's not key a attribute to break or decide functionality better
>> to go with it.
>
> Agreed. This also matches with the kernel behaviour.

So it is correct to print an error, and then continue? This error will
almost never occur and thus it wastes code space. SPI is sensitive
because it can be used in SPL. Linux doesn't care about code size as
much.

So how about either:
1. debug() and return an error
2. debug() and skip the error

Regards,
Simon


More information about the U-Boot mailing list