Re: [PATCH] arm64: io: specify asm operand width for __iormb()

From: Will Deacon
Date: Thu Nov 29 2018 - 11:37:01 EST


On Thu, Nov 29, 2018 at 09:17:38AM -0700, Nathan Chancellor wrote:
> On Thu, Nov 29, 2018 at 04:13:37PM +0000, Will Deacon wrote:
> > On Thu, Nov 29, 2018 at 09:10:39AM -0700, Nathan Chancellor wrote:
> > > This doesn't appear to work, I get this error:
> > >
> > > In file included from arch/arm64/kernel/asm-offsets.c:24:
> > > In file included from ./include/linux/dma-mapping.h:11:
> > > In file included from ./include/linux/scatterlist.h:9:
> > > In file included from ./arch/arm64/include/asm/io.h:209:
> > > ./include/asm-generic/io.h:695:9: error: expected expression
> > > return readb(addr);
> > > ^
> > > ./arch/arm64/include/asm/io.h:147:50: note: expanded from macro 'readb'
> > > #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(__v); __v; })
> > > ^
> > > ./arch/arm64/include/asm/io.h:120:28: note: expanded from macro '__iormb'
> > > : "=r" (tmp) : "r" (unsigned long)(v) : "memory"); \
> > > ^
> >
> > Can you try throwing another set of brackets around it, please?
> >
> > ((unsigned long)(v))
> >
> Thanks, that fixes the warning as well.

Great, I'll push this out tomorrow with your reported-by on it.

Will