All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 01/11] ARM: mmp: fix build error on gpio
Date: Thu, 17 Nov 2011 15:16:24 +0000	[thread overview]
Message-ID: <201111171516.24237.arnd@arndb.de> (raw)
In-Reply-To: <1320806851-13928-2-git-send-email-haojian.zhuang@marvell.com>

On Wednesday 09 November 2011, Haojian Zhuang wrote:
> Parameters of GPIO_REG() should be assigned as volatile.
> 
> arch/arm/plat-pxa/include/plat/gpio.h: In function ?gpio_get_value?:
> arch/arm/plat-pxa/include/plat/gpio.h:12:21: error: invalid operands to
> binary & (have ?void *? and ?int?)
> arch/arm/plat-pxa/include/plat/gpio.h: In function ?gpio_set_value?:
> arch/arm/plat-pxa/include/plat/gpio.h:21:4: error: lvalue required as
> left operand of assignment
> arch/arm/plat-pxa/include/plat/gpio.h:23:4: error: lvalue required as
> left operand of assignment
> 
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
> ---
>  arch/arm/mach-mmp/include/mach/gpio-pxa.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h
> index d14eeaf..99b4ce1 100644
> --- a/arch/arm/mach-mmp/include/mach/gpio-pxa.h
> +++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h
> @@ -7,7 +7,7 @@
>  #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000)
>  
>  #define BANK_OFF(n)    (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
> -#define GPIO_REG(x)    (GPIO_REGS_VIRT + (x))
> +#define GPIO_REG(x)    (*(volatile u32 *)(GPIO_REGS_VIRT + (x)))
>  
>  #define NR_BUILTIN_GPIO                IRQ_GPIO_NUM

Note that this is not the correct fix, it just restores the previous
state after I broke the original code in an "evil" merge commit
that tried to merge the gpio branch with my patch that changed the
mmio annotations.

Anyway, everything seems fine now, since patch 9/11 removes the code
either way.

	Arnd

  parent reply	other threads:[~2011-11-17 15:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  2:47 [PATCH v7 00/11] change pxa gpio to platform driver Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 01/11] ARM: mmp: fix build error on gpio Haojian Zhuang
2011-11-14  5:34   ` Eric Miao
2011-11-17 15:16   ` Arnd Bergmann [this message]
2011-11-17 15:33     ` Eric Miao
2011-11-17 17:00       ` Arnd Bergmann
2011-11-17 17:04         ` Russell King - ARM Linux
2011-11-09  2:47 ` [PATCH v7 02/11] ARM: pxa: rename IRQ_GPIO to PXA_GPIO_TO_IRQ Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 03/11] ARM: pxa: use chained interrupt for GPIO0 and GPIO1 Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 04/11] ARM: pxa: rename gpio_to_irq and irq_to_gpio Haojian Zhuang
2011-11-14 10:09   ` Russell King - ARM Linux
2011-11-14 10:28     ` Haojian Zhuang
2011-11-14 10:32       ` Russell King - ARM Linux
2011-11-14 10:34         ` Haojian Zhuang
2011-11-14 10:37           ` Russell King - ARM Linux
2011-11-09  2:47 ` [PATCH v7 05/11] ARM: pxa: recognize gpio number and type Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 06/11] ARM: pxa: rename NR_BUILTIN_GPIO Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 07/11] ARM: pxa: use little endian read write in gpio driver Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 08/11] ARM: pxa: use generic gpio operation instead of gpio register Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 09/11] ARM: pxa: change gpio to platform device Haojian Zhuang
2012-04-06  4:04   ` Chris Ball
2012-04-06  4:49     ` Chris Ball
2012-04-06  5:55       ` Haojian Zhuang
2012-04-09  1:26         ` Chris Ball
2011-11-09  2:47 ` [PATCH v7 10/11] ARM: mmp: clear gpio edge detect Haojian Zhuang
2011-11-09  2:47 ` [PATCH v7 11/11] ARM: pxa: add clk support in gpio driver Haojian Zhuang
2011-11-14 10:33 ` [PATCH v7 00/11] change pxa gpio to platform driver Russell King - ARM Linux

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=201111171516.24237.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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 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.