Re: [PATCH] spi: sh-msiof: Do not redefine STR while compile testing

From: Krzysztof Kozlowski
Date: Wed Jan 08 2020 - 02:19:01 EST


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@xxxxxxxxxx> 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@xxxxxxxxxx>
>
> 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