[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200108071850.GA9762@pi3>
Date: Wed, 8 Jan 2020 08:18:50 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Mark Brown <broonie@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Stephen Boyd <swboyd@...omium.org>,
linux-spi <linux-spi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [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@...nel.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@...nel.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
Powered by blists - more mailing lists