From: Chen Gang <gang.chen@asianux.com>
To: Yoshinori Sato <ysato@users.sourceforge.jp>,
ak@linux.intel.com, Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] h8300: Register: add prefix "H8_" to IER
Date: Thu, 29 Aug 2013 18:35:29 +0800 [thread overview]
Message-ID: <521F23F1.30300@asianux.com> (raw)
In-Reply-To: <521F22F1.3090604@asianux.com>
All the other h8300 register macros also face the same risk, but not
cause compiling error now (but may cause warning -- I did not check the
related warnings).
If suitable to change all of them with prefix "H8_", please let me know,
I will send the related patch for it.
Thanks.
On 08/29/2013 06:31 PM, Chen Gang wrote:
> IER is so common used (e.g. "include/media/saa7146.h", "drivers/isdn
> /hisax/hisax.h"), need add prefix for it, or it may be overridden (can
> not pass compiling with allmodconfig for h8300).
>
> The related error:
>
> CC [M] drivers/isdn/hisax/config.o
> In file included from arch/h8300/include/asm/io.h:9:0,
> from drivers/isdn/hisax/hisax.h:12,
> from drivers/isdn/hisax/config.c:21:
> arch/h8300/include/asm/regs306x.h:73:14: error: expected identifier or '(' before numeric constant
> #define IER 0xFEE015
> ^
> drivers/isdn/hisax/hisax.h:574:9: note: in expansion of macro 'IER'
> u_char IER;
> ^
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> arch/h8300/include/asm/irq.h | 4 ++--
> arch/h8300/include/asm/regs267x.h | 2 +-
> arch/h8300/include/asm/regs306x.h | 2 +-
> arch/h8300/platform/h8300h/irq.c | 4 ++--
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/h8300/include/asm/irq.h b/arch/h8300/include/asm/irq.h
> index 13d7c60..0964676 100644
> --- a/arch/h8300/include/asm/irq.h
> +++ b/arch/h8300/include/asm/irq.h
> @@ -14,7 +14,7 @@
> #define EXT_IRQ6 18
> #define EXT_IRQ7 19
> #define EXT_IRQS 5
> -#define IER_REGS *(volatile unsigned char *)IER
> +#define IER_REGS *(volatile unsigned char *)H8_IER
> #endif
> #if defined(CONFIG_CPU_H8S)
> #define NR_IRQS 128
> @@ -36,7 +36,7 @@
> #define EXT_IRQ15 31
> #define EXT_IRQS 15
>
> -#define IER_REGS *(volatile unsigned short *)IER
> +#define IER_REGS *(volatile unsigned short *)H8_IER
> #endif
>
> static __inline__ int irq_canonicalize(int irq)
> diff --git a/arch/h8300/include/asm/regs267x.h b/arch/h8300/include/asm/regs267x.h
> index 1bff731..0137ef0 100644
> --- a/arch/h8300/include/asm/regs267x.h
> +++ b/arch/h8300/include/asm/regs267x.h
> @@ -131,7 +131,7 @@
> #define ISCRL 0xFFFE1C
>
> #define INTCR 0xFFFF31
> -#define IER 0xFFFF32
> +#define H8_IER 0xFFFF32
> #define IERH 0xFFFF32
> #define IERL 0xFFFF33
> #define ISR 0xFFFF34
> diff --git a/arch/h8300/include/asm/regs306x.h b/arch/h8300/include/asm/regs306x.h
> index 027dd63..046bb61 100644
> --- a/arch/h8300/include/asm/regs306x.h
> +++ b/arch/h8300/include/asm/regs306x.h
> @@ -70,7 +70,7 @@
> #define DTCR1B 0xFFFF3F
>
> #define ISCR 0xFEE014
> -#define IER 0xFEE015
> +#define H8_IER 0xFEE015
> #define ISR 0xFEE016
> #define IPRA 0xFEE018
> #define IPRB 0xFEE019
> diff --git a/arch/h8300/platform/h8300h/irq.c b/arch/h8300/platform/h8300h/irq.c
> index 0a50353..ae1e01a 100644
> --- a/arch/h8300/platform/h8300h/irq.c
> +++ b/arch/h8300/platform/h8300h/irq.c
> @@ -70,12 +70,12 @@ void h8300_disable_irq_pin(unsigned int irq)
> case EXT_IRQ1:
> case EXT_IRQ2:
> case EXT_IRQ3:
> - *(volatile unsigned char *)IER &= ~bitmask;
> + *(volatile unsigned char *)H8_IER &= ~bitmask;
> H8300_GPIO_FREE(H8300_GPIO_P8, bitmask);
> break ;
> case EXT_IRQ4:
> case EXT_IRQ5:
> - *(volatile unsigned char *)IER &= ~bitmask;
> + *(volatile unsigned char *)H8_IER &= ~bitmask;
> H8300_GPIO_FREE(H8300_GPIO_P9, bitmask);
> break;
> }
>
--
Chen Gang
next prev parent reply other threads:[~2013-08-29 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 10:31 [PATCH] h8300: Register: add prefix "H8_" to IER Chen Gang
2013-08-29 10:35 ` Chen Gang [this message]
2013-08-30 8:51 ` Chen Gang
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=521F23F1.30300@asianux.com \
--to=gang.chen@asianux.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.