[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWwOVjnhhqkdDUpfzrNTreNMds_k7svmUFaLPBbWL4BMQ@mail.gmail.com>
Date: Thu, 25 Sep 2014 22:17:10 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Daniel Thompson <daniel.thompson@...aro.org>,
Will Deacon <will.deacon@....com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
"chris@...kel.net" <chris@...kel.net>,
"cmetcalf@...era.com" <cmetcalf@...era.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"deller@....de" <deller@....de>,
"dhowells@...hat.com" <dhowells@...hat.com>,
"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
"hpa@...or.com" <hpa@...or.com>,
"jcmvbkbc@...il.com" <jcmvbkbc@...il.com>,
"jesper.nilsson@...s.com" <jesper.nilsson@...s.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"monstr@...str.eu" <monstr@...str.eu>,
"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
"rdunlap@...radead.org" <rdunlap@...radead.org>,
"sam@...nborg.org" <sam@...nborg.org>,
"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
"starvik@...s.com" <starvik@...s.com>,
"takata@...ux-m32r.org" <takata@...ux-m32r.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"tony.luck@...el.com" <tony.luck@...el.com>,
"broonie@...aro.org" <broonie@...aro.org>,
"linux@....linux.org.uk" <linux@....linux.org.uk>,
"thierry.reding@...il.com" <thierry.reding@...il.com>
Subject: Re: [PATCH v3 00/17] Cross-architecture definitions of relaxed MMIO accessors
Hi Arnd,
On Thu, Sep 25, 2014 at 9:17 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Thursday 25 September 2014, Daniel Thompson wrote:
>> > +
>> > +#ifndef readq_relaxed
>> > +#define readq_relaxed readq
>> > +#endif
>>
>> Not really sure if it matters but this gives a rather surprising
>> behaviour to #ifdef readq_relaxed given that readq may not be defined.
>
> It was intentional. I could have written this as
>
> #if !defined(readq_relaxed) && defined(readq)
>
> but the effect would be almost the same, and the version I picked looks
> simpler.
However, as soon as a driver has code like
#ifdef readq_relaxed
do something using readq_relaxed
#else
...
#endif
this will fail if readq is not defined.
Currently no code has such an #ifdef, though.
There are #ifdefs for checking for the presence of readq.
The same is true for writeq_relaxed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists