Re: [PATCH] gpio: rcar: Use new line value setter callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 17, 2025 at 11:12 AM Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
>
> Hi Bartosz,
>
> On Tue, 17 Jun 2025 at 11:06, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> > On Fri, Jun 13, 2025 at 2:02 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > > On Fri, 13 Jun 2025 at 13:42, Wolfram Sang
> > > <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
> > > > >       bankmask = mask[0] & GENMASK(chip->ngpio - 1, 0);
> > > > >       if (!bankmask)
> > > > > -             return;
> > > > > +             return 0;
> > > >
> > > > Doesn't that mean that the mask is invalid and we could return an error
> > > > here? Or is '!bankmask' an expected use-case?
> > >
> > > That is a good question!
> > >
> > > I _think_ this really can't happen anymore, as the GPIO core is supposed
> > > to check this against the valid mask? Or isn't it?
> >
> > Yes but this doesn't seem to have anything to do with the valid_mask?
> > If it's about the number of GPIOs then that too is verified by GPIO
> > core.
>
> Sure, about the collection of valid GPIO offsets.  So it cannot really
> happen, and just bailing out with zero sounds fine to me?
>

If this cannot happen, then why not drop the check?

Bart





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux