[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2pYb/h1eu/A+hLz@smile.fi.intel.com>
Date: Tue, 8 Nov 2022 15:23:59 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v1 2/2] gpiolib: of: Integrate
of_gpiochip_init_valid_mask() into gpiochip_init_valid_mask()
On Tue, Nov 08, 2022 at 10:41:43AM +0200, Andy Shevchenko wrote:
> On Mon, Nov 07, 2022 at 01:40:53PM -0800, Dmitry Torokhov wrote:
> > On Mon, Nov 07, 2022 at 11:09:19PM +0200, Andy Shevchenko wrote:
...
> > I am more worried about sz being odd and the loop ending up trying to
> > dereference ranges[-1].
>
> I see. What if we take amount of ranges as the parameter and convert to size by
> multiplying by 2?
Okay, I found a way how to avoid additional churn and add validation.
I will incorporate that in v2 with your tags.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists