netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Fabio Estevam <festevam@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check
Date: Tue, 18 Jul 2017 15:32:09 +0200	[thread overview]
Message-ID: <20170718133209.GB32757@lunn.ch> (raw)
In-Reply-To: <CAOMZO5BycGHNocULcScDczRoEvbQqjnRZTDrNAw7=+zpadSOSA@mail.gmail.com>

On Tue, Jul 18, 2017 at 09:52:51AM -0300, Fabio Estevam wrote:
> On Tue, Jul 18, 2017 at 9:48 AM, Sergei Shtylyov
> <sergei.shtylyov@cogentembedded.com> wrote:
> > On 07/18/2017 03:39 PM, Fabio Estevam wrote:
> >
> >>>    Won't this result in kernel WARNING when GPIO is disabled?
> >
> >
> >    GPIO support, I was going to type...
> >
> >> Not sure if I understood your point, but gpiod_set_value_cansleep() is
> >> a no-op when the gpiod is NULL.
> >
> >
> >    Look at the stub in <linux/gpio/consumer.h>, it has WARN_ON(1).
> 
> This patch does not alter the behavior of the driver with respect to
> GPIO being disabled, so I still do not understand your concern.

http://elixir.free-electrons.com/linux/latest/source/include/linux/gpio/consumer.h#L345
static inline void gpiod_set_value_cansleep(struct gpio_desc *desc, int value)
{
	/* GPIO can never have been requested */
	WARN_ON(1);
}

But i would say this is a gpio problem. If GPIO enabled does not care,
GPIO disabled should also not care.

Adding Linus Walleij.

     Andrew

  parent reply	other threads:[~2017-07-18 13:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 21:09 [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17 21:21 ` Andrew Lunn
2017-07-17 23:57 ` David Miller
2017-07-18  9:56 ` Sergei Shtylyov
2017-07-18 12:39   ` Fabio Estevam
2017-07-18 12:48     ` Sergei Shtylyov
2017-07-18 12:52       ` Fabio Estevam
2017-07-18 13:02         ` Sergei Shtylyov
2017-07-18 13:09           ` Fabio Estevam
2017-07-18 13:13             ` Sergei Shtylyov
2017-07-18 13:32         ` Andrew Lunn [this message]
2017-07-19 22:37           ` Fabio Estevam
2017-08-02 11:57           ` Linus Walleij
2017-09-07 21:30             ` Woojung.Huh
2017-09-07 21:33               ` Linus Walleij
2017-09-07 21:39                 ` Florian Fainelli
2017-09-07 21:51                   ` Woojung.Huh
2017-09-08 19:56                     ` Florian Fainelli
2017-09-08 20:03                       ` Woojung.Huh
2017-09-08 23:17                   ` Linus Walleij

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=20170718133209.GB32757@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fabio.estevam@nxp.com \
    --cc=festevam@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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).