Re: [PATCH v5 04/15] soundwire: Add MIPI DisCo property helpers

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

 



On Mon, 11 Dec 2017 18:00:22 +0100,
Vinod Koul wrote:
> 
> On Mon, Dec 11, 2017 at 05:10:17PM +0100, Takashi Iwai wrote:
> > On Wed, 06 Dec 2017 16:47:00 +0100,
> > Vinod Koul wrote:
> > > 
> > > +		/* TODO: Read audio mode */
> > > +
> > > +		i++;
> > > +	}
> > 
> > Don't we use count argument for a sanity check?
> 
> Not really as that iterator runs on each bit:
> 
> for_each_set_bit(bit, &addr, 32) {
> 
> so it will not go on endlessly and can max out when all the bits being set
> and stop.

Yes, that shouldn't happen.  OTOH, only looking at the callee side,
one may wonder that the possible error would be dpn[] overflows the
given array size (=count).  Though, looking at both caller and callee,
one realizes that it shouldn't happen, too.
(But then again wonders why passing count argument at all :)


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux