Re: [PATCH v6] gpio: driver for PrimeCell PL061 GPIO controller

From: Baruch Siach
Date: Fri Jun 19 2009 - 09:45:03 EST


Hi Andrew,

Thanks for your review.

On Thu, Jun 18, 2009 at 03:19:16PM -0700, Andrew Morton wrote:
> On Wed, 17 Jun 2009 09:34:37 +0300
> Baruch Siach <baruch@xxxxxxxxxx> wrote:
> > ...
> >
> > +static int __init pl061_probe(struct amba_device *dev, struct amba_id *id)
> > +{
> > + struct pl061_platform_data *pdata;
> > + struct pl061_gpio *chip;
> > + struct list_head *chip_list;
> > + int ret, irq, i;
> > + static unsigned long init_irq[BITS_TO_LONGS(NR_IRQS)];
>
> We could perhaps use DECLARE_BITMAP() here. Which implies that the
> whole use of this bitmap should use the bitmap API rather than
> open-coded bitops.
>
> I don't know whether that would actually improve anything - it's just a
> thought..

I'll change that.

> > + if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */
> > + chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL);
> > + if (chip_list == NULL) {
>
> We should do a clear_bit() here.

Will fix.

Should I post v7 of the entire patch, or just a fix-up for these issues?

baruch

--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@xxxxxxxxxx - tel: +972.2.679.5364, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/