Re: [PATCH v3 2/3] gpiolib: Support 'gpio-reserved-ranges' property

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

 



On Wed, 2018-03-21 at 12:59 -0700, Stephen Boyd wrote:
> Quoting Andy Shevchenko (2018-03-21 10:59:10)
> > On Wed, 2018-03-21 at 09:58 -0700, Stephen Boyd wrote:
> > > 

> > 
> > > +     gpiochip->valid_mask = kcalloc(BITS_TO_LONGS(gpiochip-
> > > > ngpio),
> > > 
> > > +                                    sizeof(long), GFP_KERNEL);
> > 
> > Just noticed that kcalloc is superfluous here.
> > kmalloc_array() would be enough.
> > 
> 
> Ok. I was copying the irqchip style. Should I fold them together into
> a
> helper function and also update to kmalloc_array?

Not sure about first part, but definitely makes sense the second one (as
a separate patch perhaps).

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux