Re: [PATCH v4] USB host: Fix lockdep warning in AMD PLL quirk

From: Alan Stern
Date: Fri Apr 08 2011 - 12:30:21 EST


On Fri, 8 Apr 2011, Roedel, Joerg wrote:

> > > + info = amd_chipset;
> >
> > What's the point of this line? You're just going to write over all the
> > data in info anyway, so it doesn't matter what amd_chipset contains. A
> > memset would work just as well.
>
> info is on-stack and needs to be initialized somehow because the
> following code does not touch the whole data structure.

Then just use memset.

Alan Stern

--
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/