[PATCH] ARM: dove: fix returnvar.cocci warnings

Arnd Bergmann arnd at arndb.de
Tue May 3 00:21:49 PDT 2022


On Tue, May 3, 2022 at 4:45 AM kernel test robot <lkp at intel.com> wrote:
>
> From: kernel test robot <lkp at intel.com>
>
> arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return "0" on line 161
>
>
>  Remove unneeded variable used to store return value.
>
> Generated by: scripts/coccinelle/misc/returnvar.cocci
>
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: kernel test robot <lkp at intel.com>

I checked the patch, and unfortunately it is wrong, the current code
needs to stay.
The problem is the SET_DMA_ERRATA() macro that accesses the
local 'errata' variable.

         Arnd



More information about the linux-arm-kernel mailing list