All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	stable@vger.kernel.org, Stefan Wahren <wahrenst@gmx.net>
Subject: Re: [PATCH] gpio: cdev: sanitize the label before requesting the interrupt
Date: Fri, 22 Mar 2024 19:54:19 +0800	[thread overview]
Message-ID: <20240322115419.GA31273@rigel> (raw)
In-Reply-To: <f529d746-f8c5-466b-860b-e2bfaeb2cc27@moroto.mountain>

On Fri, Mar 22, 2024 at 12:31:36PM +0300, Dan Carpenter wrote:
> On Fri, Mar 22, 2024 at 08:46:50AM +0100, Bartosz Golaszewski wrote:
> > On Fri, Mar 22, 2024 at 2:30 AM Kent Gibson <warthog618@gmail.com> wrote:
> > >
> > > On Wed, Mar 20, 2024 at 01:59:44PM +0100, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > >
> > > > Let's replace all "/" with "-".
> > > >
> > >
> > > I actually prefer the ":" you originally suggested, as it more clearly
> > > indicates a tier separation, whereas a hyphen is commonly used for
> > > multi-word names. And as the hyphen is more commonly used the sanitized
> > > name is more likely to conflict.
> > >
> >
> > Sounds good, will do.
> > > >
> > > > +     label = make_irq_label(le->label);
> > > > +     if (!label)
> > > > +             goto out_free_le;
> > > > +
> > >
> > > Need to set ret = -ENOMEM before the goto, else you will return 0.
> > >
> >
> > Eek, right, thanks.
>
> Smatch has a warning about this, btw.
> drivers/gpio/gpiolib-cdev.c:2221 lineevent_create() warn: missing error code 'ret'
>

And that triggered a "what the hell does that mean" warning in my
wetware error parser ;-).

That could be better worded - it isn't "missing", it hasn't been
appropriately set. So maybe "unset error code"?

> The other warning here is:
> drivers/gpio/gpiolib-cdev.c:2269 lineevent_create() warn: 'irq' from request_threaded_irq() not released on lines: 2258.
>

Looks like a false positive to me - as per the comment in the code, that path
(2258) results in lineevent_release() being called and that releases the irq.

Cheers,
Kent.

  reply	other threads:[~2024-03-22 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 12:59 [PATCH] gpio: cdev: sanitize the label before requesting the interrupt Bartosz Golaszewski
2024-03-22  1:30 ` Kent Gibson
2024-03-22  7:46   ` Bartosz Golaszewski
2024-03-22  9:31     ` Dan Carpenter
2024-03-22 11:54       ` Kent Gibson [this message]
2024-03-22 12:58         ` Dan Carpenter

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=20240322115419.GA31273@rigel \
    --to=warthog618@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=dan.carpenter@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wahrenst@gmx.net \
    /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.