lkml.org 
[lkml]   [2022]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: dove: fix returnvar.cocci warnings
* Arnd Bergmann <arnd@arndb.de> [220503 08:12]:
> On Tue, May 3, 2022 at 9:30 AM Tony Lindgren <tony@atomide.com> wrote:
> > * Arnd Bergmann <arnd@arndb.de> [220503 07:18]:
> > > On Tue, May 3, 2022 at 4:45 AM kernel test robot <lkp@intel.com> wrote:
> > > >
> > > > From: kernel test robot <lkp@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@intel.com>
> > > > Signed-off-by: kernel test robot <lkp@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.
> >
> > Yeah this one keeps popping up. Maybe we can make SET_DMA_ERRATA
> > into a function or have it at least change it to set the errata
> > value.
>
> I would just remove the macro and open-code the assignment, which
> I think makes it more readable to both people and tools.

Yeah agree after looking at the macro :)

Regards,

Tony

\
 
 \ /
  Last update: 2022-05-03 10:23    [W:0.061 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site