lkml.org 
[lkml]   [2020]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] spi: sh-msiof: Do not redefine STR while compile testing
On Tue, Jan 07, 2020 at 09:10:37PM +0100, Geert Uytterhoeven wrote:
> Hi Krzysztof,
>
> On Tue, Jan 7, 2020 at 5:57 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > STR is a well-known stringify macro so it should be avoided in drivers
> > to avoid warnings like this (MIPS architecture while compile testing):
> >
> > drivers/spi/spi-sh-msiof.c:76:0: warning: "STR" redefined
> > #define STR 0x40 /* Status Register */
> > arch/mips/include/asm/mipsregs.h:30:0: note: this is the location of the previous definition
> > #define STR(x) __STR(x)
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Thanks for your patch!
>
> > --- a/drivers/spi/spi-sh-msiof.c
> > +++ b/drivers/spi/spi-sh-msiof.c
> > @@ -73,7 +73,7 @@ struct sh_msiof_spi_priv {
> > #define RSCR 0x22 /* Receive Clock Select Register (SH, A1, APE6) */
> > #define CTR 0x28 /* Control Register */
> > #define FCTR 0x30 /* FIFO Control Register */
> > -#define STR 0x40 /* Status Register */
> > +#define STATR 0x40 /* Status Register */
>
> The datasheets call this register "SISTR", so I prefer to use that instead.
> Actually all registers have this "SI" ("Serial Interface"?) prefix.
> Shall I add this to my TODO-list?

I can send a v2 changing all register names there to SISTR-like names.

Best regards,
Krzysztof

\
 
 \ /
  Last update: 2020-01-08 08:19    [W:0.048 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site