From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section
Date: Wed, 31 Oct 2012 15:19:23 +0800 [thread overview]
Message-ID: <20121031071923.GE29509@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <20121031071236.GA13393@localhost>
On Wed, Oct 31, 2012 at 03:12:36PM +0800, Fengguang Wu wrote:
> On Wed, Oct 31, 2012 at 03:00:54PM +0800, Yuanhan Liu wrote:
> > There are 2 issues with current code:
> >
> > 1. redefinition of 'gpio_cansleep':
> > include/linux/gpio.h:60:19: error: redefinition of 'gpio_cansleep'
> > include/asm-generic/gpio.h:212:19: note: previous definition of 'gpio_cansleep' was here
> >
> > The root cause is include/linux/gpio.h has a defintion of it. And if
> > CONFIG_GPIOLIB is not set, include/asm-generic/gpio.h has another
> > definition.
> >
> > 2. include/linux/gpio.h:62:2: error: implicit declaration of function '__gpio_cansleep'
> >
> > Only happens when CONFIG_GPIOLIB is not set, too. Since it called
> > gpiolib functions without putting something like: #ifdef CONFIG_GPIOLIB
> >
> > So, move those functions into proper section at
> > include/asm-generic/gpio.h would resolve 2 above issues.
>
> The patch introduces new build errors:
Ooops. I checked the log at build server and posted it after finding no
errors. Seems that the test hasn't been finished?
Sorry for the nosiy. Will send v2 then.
Thanks!
>
> yuanhan:gpio-fixes [2/2] db1a5a0 blackfin-BF526-EZBRD_defconfig
>
> [error]
> arch/blackfin/include/asm/gpio.h:197:19: error: redefinition of 'gpio_get_value'
> arch/blackfin/include/asm/gpio.h:205:20: error: redefinition of 'gpio_set_value'
> arch/blackfin/include/asm/gpio.h:213:19: error: redefinition of 'gpio_cansleep'
> arch/blackfin/include/asm/gpio.h:218:19: error: redefinition of 'gpio_to_irq'
>
> yuanhan:gpio-fixes [2/2] db1a5a0 blackfin-TCM-BF537_defconfig
>
> [error]
> include/asm-generic/gpio.h:225:19: error: redefinition of 'gpio_get_value'
> include/asm-generic/gpio.h:231:20: error: redefinition of 'gpio_set_value'
> include/asm-generic/gpio.h:242:19: error: redefinition of 'gpio_to_irq'
>
> yuanhan:gpio-fixes [2/2] db1a5a0 sh-rsk7269_defconfig
>
> [error]
> arch/sh/include/asm/gpio.h:27:19: error: redefinition of 'gpio_get_value'
> arch/sh/include/asm/gpio.h:32:20: error: redefinition of 'gpio_set_value'
> arch/sh/include/asm/gpio.h:37:19: error: redefinition of 'gpio_cansleep'
> arch/sh/include/asm/gpio.h:42:19: error: redefinition of 'gpio_to_irq'
>
> yuanhan:gpio-fixes [2/2] db1a5a0 avr32-atngw100_defconfig
>
> [error]
> arch/avr32/mach-at32ap/include/mach/gpio.h:18: error: redefinition of 'gpio_get_value'
> include/asm-generic/gpio.h:203: error: previous definition of 'gpio_get_value' was here
> arch/avr32/mach-at32ap/include/mach/gpio.h:23: error: redefinition of 'gpio_set_value'
> include/asm-generic/gpio.h:208: error: previous definition of 'gpio_set_value' was here
> arch/avr32/mach-at32ap/include/mach/gpio.h:28: error: redefinition of 'gpio_cansleep'
> include/asm-generic/gpio.h:213: error: previous definition of 'gpio_cansleep' was here
> arch/avr32/mach-at32ap/include/mach/gpio.h:34: error: redefinition of 'gpio_to_irq'
> include/asm-generic/gpio.h:218: error: previous definition of 'gpio_to_irq' was here
>
> Thanks,
> Fengguang
prev parent reply other threads:[~2012-10-31 7:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 7:00 [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section Yuanhan Liu
2012-10-31 7:00 ` [PATCH 2/2] gpio: do not call __gpio_xxx under !CONFIG_GPIOLIB Yuanhan Liu
2012-11-04 17:47 ` Linus Walleij
2012-11-06 5:27 ` Yuanhan Liu
2012-10-31 7:12 ` [PATCH 1/2] gpio: move those interface depends on GPIOLIB into proper section Fengguang Wu
2012-10-31 7:19 ` Yuanhan Liu [this message]
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=20121031071923.GE29509@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=fengguang.wu@intel.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.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.