[PATCH] spi: rockchip: avoid objtool warning

Arnd Bergmann arnd at kernel.org
Fri Feb 26 06:15:44 EST 2021


On Fri, Feb 26, 2021 at 12:05 PM 'Pratyush Yadav' via Clang Built
Linux <clang-built-linux at googlegroups.com> wrote:
> On 26/02/21 10:49AM, Arnd Bergmann wrote:
> > On Fri, Feb 26, 2021 at 9:16 AM 'Pratyush Yadav' via Clang Built Linux <clang-built-linux at googlegroups.com> wrote:

>
> Returning an error code from this function (along with the dev_warn() or
> WARN_ON()) is the most sensible thing to do IMO. If the SPI layer sends
> an invalid value then the driver should be well within its rights to
> refuse the transaction. The function is currently void but making it
> return int seems fairly straightforward.

Indeed, this seems like a clear -EINVAL case. I've updated my patch, will
send after build testing.

       Arnd



More information about the linux-arm-kernel mailing list