From: Nick Thompson <nick.thompson@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: Convert {in, out}s[bwl] to inline functions
Date: Tue, 27 Sep 2011 09:59:55 +0100 [thread overview]
Message-ID: <4E81908B.1050503@ge.com> (raw)
In-Reply-To: <1317062895-3847-1-git-send-email-marek.vasut@gmail.com>
On 26/09/11 19:48, Marek Vasut wrote:
> The size of uboot binary grows by a few bytes, but the gain (better type
> checking) is worth it.
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Nick Thompson <nick.thompson@ge.com>
> Cc: Simon Glass <sjg@chromium.org>
Do you want to cc: Albert ARIBAUD <albert.u.boot@aribaud.net> as well?
> ---
> arch/arm/include/asm/io.h | 34 ++++++++++++++++++++++++++++------
> 1 files changed, 28 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 61f4987..d22325d 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -255,13 +255,35 @@ extern inline void __raw_readsl(unsigned int addr, void *data, int longlen)
> #define inw(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(__io(p))); __v; })
> #define inl(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(__io(p))); __v; })
>
> -#define outsb(p,d,l) __raw_writesb(__io(p),d,l)
> -#define outsw(p,d,l) __raw_writesw(__io(p),d,l)
> -#define outsl(p,d,l) __raw_writesl(__io(p),d,l)
These changes are clearly related, but we started out talking about '__arch_putb',
which is in the same file of course. Did I miss something?
This specific patch looks reasonable to me though.
Reviewed-by: Nick Thompson <nick.thompson@ge.com>
> +extern inline void outsb(unsigned int addr, const void *data, int bytelen)
> +{
> + __raw_writesb(addr, data, bytelen);
> +}
> +
> +extern inline void outsw(unsigned int addr, const void *data, int wordlen)
> +{
> + __raw_writesw(addr, data, wordlen);
> +}
> +
> +extern inline void outsl(unsigned int addr, const void *data, int longlen)
> +{
> + __raw_writesl(addr, data, longlen);
> +}
>
> -#define insb(p,d,l) __raw_readsb(__io(p),d,l)
> -#define insw(p,d,l) __raw_readsw(__io(p),d,l)
> -#define insl(p,d,l) __raw_readsl(__io(p),d,l)
> +extern inline void insb(unsigned int addr, void *data, int bytelen)
> +{
> + __raw_readsb(addr, data, bytelen);
> +}
> +
> +extern inline void insw(unsigned int addr, void *data, int wordlen)
> +{
> + __raw_readsw(addr, data, wordlen);
> +}
> +
> +extern inline void insl(unsigned int addr, void *data, int longlen)
> +{
> + __raw_readsl(addr, data, longlen);
> +}
> #endif
>
> #define outb_p(val,port) outb((val),(port))
next prev parent reply other threads:[~2011-09-27 8:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 18:48 [U-Boot] [PATCH] ARM: Convert {in,out}s[bwl] to inline functions Marek Vasut
2011-09-27 8:59 ` Nick Thompson [this message]
2011-09-27 9:31 ` [U-Boot] [PATCH] ARM: Convert {in, out}s[bwl] " Wolfgang Denk
2011-09-27 10:21 ` Marek Vasut
2011-09-27 11:57 ` Nick Thompson
2011-09-27 12:02 ` Marek Vasut
2011-09-27 22:40 ` Simon Glass
2011-09-28 10:56 ` Marek Vasut
2011-09-27 9:32 ` Wolfgang Denk
2011-09-27 10:08 ` Marek Vasut
2011-09-28 20:46 ` Wolfgang Denk
2011-09-28 20:58 ` Marek Vasut
2011-09-28 21:15 ` Wolfgang Denk
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=4E81908B.1050503@ge.com \
--to=nick.thompson@ge.com \
--cc=u-boot@lists.denx.de \
/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