From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
Fengguang Wu <fengguang.wu@intel.com>
Subject: Re: [PATCH 2/2] gpio: do not call __gpio_xxx under !CONFIG_GPIOLIB
Date: Tue, 6 Nov 2012 13:27:29 +0800 [thread overview]
Message-ID: <20121106052729.GR16883@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <CACRpkdapHWJAMFn0hUQF52RjBz38MZzD3GS+5+pLfhsKJ+p_GQ@mail.gmail.com>
On Sun, Nov 04, 2012 at 06:47:12PM +0100, Linus Walleij wrote:
> On Wed, Oct 31, 2012 at 8:00 AM, Yuanhan Liu
> <yuanhan.liu@linux.intel.com> wrote:
>
> > Those functions are availabe only when CONFIG_GPIOLIB is set. So, we
> > should not call them under !CONFIG_GPIOLIB block.
> >
> > This would fix following build errros:
> > include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':
> > include/asm-generic/gpio.h:220:2: error: implicit declaration of function '__gpio_get_value'
> > include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':
> > nclude/asm-generic/gpio.h:226:2: error: implicit declaration of function '__gpio_set_value'
>
> OK...
>
> > static inline int gpio_get_value_cansleep(unsigned gpio)
> > {
> > - might_sleep();
Hi,
>
> So why are you deleting this very useful might_sleep() runtime
> semantic check?
Yes, I should keep it. I did it because I saw the definition of
gpio_get_value at include/linux/gpio.h didn't call that function.
Will keep it in the next version together with the previous patch.
And sorry that it may take some time, as I'm occupied by other things :(
Thanks.
--yliu
>
> > - return __gpio_get_value(gpio);
> > + WARN_ON(1);
> > + return 0;
> > }
> >
> > static inline void gpio_set_value_cansleep(unsigned gpio, int value)
> > {
> > - might_sleep();
> > - __gpio_set_value(gpio, value);
> > + WARN_ON(1);
> > }
>
> Yours,
> Linus Walleij
next prev parent reply other threads:[~2012-11-06 5:27 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 [this message]
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
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=20121106052729.GR16883@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.