public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: frank zago <frank@zago.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Wolfram Sang <wsa@kernel.org>, USB <linux-usb@vger.kernel.org>,
	Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	linux-i2c <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v6 2/4] gpio: ch341: add GPIO MFD cell driver for the CH341
Date: Tue, 21 Jun 2022 08:57:34 +0200	[thread overview]
Message-ID: <YrFr3s50ZMD1Et9W@hovoldconsulting.com> (raw)
In-Reply-To: <CAHp75VfWbC2fbKenuzx6LXjUTApcUKyX6gXd-3Pe31cvrbT7kQ@mail.gmail.com>

On Mon, Jun 20, 2022 at 06:08:19PM +0200, Andy Shevchenko wrote:
> On Mon, Jun 20, 2022 at 12:26 PM Johan Hovold <johan@kernel.org> wrote:
> > On Wed, Jun 15, 2022 at 08:37:45PM -0500, frank zago wrote:
> 
> ...
> 
> > > +     /* Create an URB for handling interrupt */
> > > +     dev->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
> > > +     if (!dev->irq_urb)
> > > +             return dev_err_probe(&pdev->dev, -ENOMEM, "Cannot allocate the int URB\n");
> >
> > This isn't how dev_err_probe() is used.
> 
> While I agree on the below comment, what does this imply?

That you should only use dev_err_probe() to handle -EPROBE_DEFER. That's
what it is was added for, documented as, and it is what the
implementation still tells you.

I see now that there has recently been some mission creep:

	7065f92255bb ("driver core: Clarify that dev_err_probe() is OK even w/out -EPROBE_DEFER")

I'm not sure I agree with that, but fortunately we don't need to have
that debate in this case due to the below.
 
> > And allocation failures are already logged so just return -ENOMEM here.

Johan

  reply	other threads:[~2022-06-21  6:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  1:37 [PATCH v6 0/4] add driver for the WCH CH341 in I2C/GPIO mode frank zago
2022-06-16  1:37 ` [PATCH v6 1/4] mfd: ch341: add core driver for the WCH CH341 in I2C/SPI/GPIO mode frank zago
2022-06-27 14:04   ` Lee Jones
2022-06-27 14:28     ` Greg Kroah-Hartman
2022-06-27 14:43       ` Lee Jones
2022-06-27 23:30         ` Frank Zago
2022-07-04 10:09   ` Lee Jones
2022-06-16  1:37 ` [PATCH v6 2/4] gpio: ch341: add GPIO MFD cell driver for the CH341 frank zago
2022-06-17  8:29   ` Linus Walleij
2022-06-20 10:25   ` Johan Hovold
2022-06-20 16:08     ` Andy Shevchenko
2022-06-21  6:57       ` Johan Hovold [this message]
2022-06-16  1:37 ` [PATCH v6 3/4] i2c: ch341: add I2C " frank zago
2022-06-16  5:09   ` Randy Dunlap
2022-06-16  9:18   ` kernel test robot
2022-06-16 11:10   ` kernel test robot
2022-06-16  1:37 ` [PATCH v6 4/4] docs: misc: add documentation for ch341 driver frank zago
2022-06-20 10:08 ` [PATCH v6 0/4] add driver for the WCH CH341 in I2C/GPIO mode Johan Hovold
2024-11-08 15:58 ` Matwey V. Kornilov
2024-11-08 19:11   ` Linus Walleij
2024-11-08 23:15   ` Frank Zago
2024-11-09  7:32     ` Matwey V. Kornilov

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=YrFr3s50ZMD1Et9W@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=frank@zago.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=wsa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox