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