From: Krzysztof Kozlowski <krzk@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mark Brown <broonie@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Stephen Boyd <swboyd@chromium.org>,
linux-spi <linux-spi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] spi: sh-msiof: Do not redefine STR while compile testing
Date: Wed, 8 Jan 2020 08:18:50 +0100 [thread overview]
Message-ID: <20200108071850.GA9762@pi3> (raw)
In-Reply-To: <CAMuHMdXZGqqu+rWmemzxYtSNXofeCwLwerCeb-hEoubTvBqwXw@mail.gmail.com>
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
prev parent reply other threads:[~2020-01-08 7:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 16:56 [PATCH] spi: sh-msiof: Do not redefine STR while compile testing Krzysztof Kozlowski
2020-01-07 20:10 ` Geert Uytterhoeven
2020-01-08 7:18 ` Krzysztof Kozlowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200108071850.GA9762@pi3 \
--to=krzk@kernel.org \
--cc=broonie@kernel.org \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=swboyd@chromium.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).