Re: [PATCH 4/5] cdrom: use list_head for cdrom_device_info list

From: Christoph Hellwig
Date: Sat Mar 22 2008 - 13:58:09 EST


On Sun, Mar 23, 2008 at 12:10:45AM +0900, Akinobu Mita wrote:
> 2008/3/22, Jens Axboe <jens.axboe@xxxxxxxxxx>:
> > On Sat, Mar 22 2008, Akinobu Mita wrote:
> > > Use list_head for cdrom_device_info list instead of opencoded
> > > singly list handling.
> >
> >
> > Looks good, but you don't seem to be initializing ->list anywhere. Did
> > you test this?
> >
> > I'd suggest just adding an INIT_LIST_HEAD() before the list_add() in
> > register_cdrom()
>
> It seems that current list_add() implementation doesn't need
> initalized new entry with/without CONFIG_DEBUG_LIST.

it never did and never should. only the list head needs to be
initialized.

your patch is fine in that respect.
--
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/