From: David Miller <davem@davemloft.net>
To: tony@atomide.com
Cc: tklauser@distanz.ch, nico@fluxnic.net, netdev@vger.kernel.org
Subject: Re: [PATCH net v2] net: smc91x: Fix build without gpiolib
Date: Fri, 12 Dec 2014 11:21:19 -0500 (EST) [thread overview]
Message-ID: <20141212.112119.1395396406830853805.davem@davemloft.net> (raw)
In-Reply-To: <20141212161100.GH2950@atomide.com>
From: Tony Lindgren <tony@atomide.com>
Date: Fri, 12 Dec 2014 08:11:00 -0800
> * Tobias Klauser <tklauser@distanz.ch> [141212 08:09]:
>> If GPIOLIB=n the following build errors occur:
>>
>> drivers/net/ethernet/smsc/smc91x.c: In function 'try_toggle_control_gpio':
>> drivers/net/ethernet/smsc/smc91x.c:2204:2: error: implicit declaration of function 'devm_gpiod_get_index' [-Werror=implicit-function-declaration]
>> drivers/net/ethernet/smsc/smc91x.c:2204:7: warning: assignment makes pointer from integer without a cast [enabled by default]
>> drivers/net/ethernet/smsc/smc91x.c:2213:2: error: implicit declaration of function 'gpiod_direction_output' [-Werror=implicit-function-declaration]
>> drivers/net/ethernet/smsc/smc91x.c:2216:3: error: implicit declaration of function 'devm_gpiod_put' [-Werror=implicit-function-declaration]
>> drivers/net/ethernet/smsc/smc91x.c:2222:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
>>
>> Since the toggling of the GPIOs is an optional feature, define
>> try_toggle_control_gpio only if GPIOLIB is enabled.
>
> Oops sorry about that, I guess my systems have it all selected so
> randconfig builds did not expose it.
>
> Would it make sense to add the missing gpio stub into
> include/linux/gpio/consumer.h instead?
I really don't like these kinds of things at all.
If GPIO is required to fully program the hardware properly,
the smc91x driver should have it as a dependency.
next prev parent reply other threads:[~2014-12-12 16:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 16:07 [PATCH net v2] net: smc91x: Fix build without gpiolib Tobias Klauser
2014-12-12 16:11 ` Tony Lindgren
2014-12-12 16:21 ` David Miller [this message]
2014-12-12 16:27 ` Tobias Klauser
2014-12-12 16:30 ` David Miller
2014-12-12 16:34 ` Tony Lindgren
2014-12-12 16:45 ` Tobias Klauser
2014-12-12 16:58 ` David Miller
2014-12-15 8:56 ` Tobias Klauser
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=20141212.112119.1395396406830853805.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=tklauser@distanz.ch \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).