linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro.
Date: Sat, 28 Nov 2009 21:12:31 +0100	[thread overview]
Message-ID: <m3skbywgr4.fsf@intrepid.localdomain> (raw)
In-Reply-To: <20091128182439.GB497@n2100.arm.linux.org.uk> (Russell King's message of "Sat, 28 Nov 2009 18:24:39 +0000")

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> Missed this.
>
> If you want to override a function, it's preferred to do it the way we're
> doing it.
>
> In otherwords, if you want to override a symbol using an inline function.
> Eg:
>
> #ifndef ndelay
> static inline void ndelay(unsigned long x)
> {
>         udelay(DIV_ROUND_UP(x, 1000));
> }
> #define ndelay(x) ndelay(x)
> #endif

I fear someone may want to remove this later thinking that
"#define a() a()" is not necessary.

Also we'd need to test each individual macro in the generic header since
we don't know if having ioread8 also means having other functions.

#ifndef ioread8
define ioread8()
#endif

#ifndef ioread16
define ioread16()
...

etc.

One self-explaining HAVE_IOREAD_AND_IOWRITE has no such problems.

But I can convert to these #ifndef ioread{8,16,etc} of course if you
wish. Please let me know if you want only ioread8 tested, or all of
them respectively.

What is important to me is that the IXP4xx functions are not called
__ixp4xx_something() if they do just the something() (instead of maybe
__raw_something() or __indirect_something()).

Thanks.
-- 
Krzysztof Halasa

  reply	other threads:[~2009-11-28 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14 23:05 [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro Krzysztof Halasa
2009-11-14 23:33 ` IXP4xx: Drop "__ixp4xx_" prefix from in/out/ioread/iowrite functions for clarity. Re: (to fool the list server) Krzysztof Halasa
2009-11-14 23:43 ` IXP4xx: Rename indirect MMIO primitives from __ixp4xx_* to __indirect_*. Re: nothing Krzysztof Halasa
2009-11-28 18:24 ` [PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro Russell King - ARM Linux
2009-11-28 20:12   ` Krzysztof Halasa [this message]
2009-11-28 20:25     ` Russell King - ARM Linux
2009-11-28 20:47       ` Krzysztof Halasa

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=m3skbywgr4.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).