lkml.org 
[lkml]   [2017]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH v2 03/14] soundwire: Add Master registration
On Thu, Nov 16, 2017 at 05:30:24PM +0000, Mark Brown wrote:
> On Thu, Nov 16, 2017 at 10:19:44PM +0530, Vinod Koul wrote:
> > On Thu, Nov 16, 2017 at 04:05:22PM +0000, Srinivas Kandagatla wrote:
>
> > > >+ *bus->assigned = ~GENMASK(SDW_BROADCAST_DEV_NUM, SDW_ENUM_DEV_NUM);
>
> > > Can't we use ida for this.
> > > This would also cut down code added for allocating dev_num.
>
> > Device numbers in SoundWire are 0 thru 15 with 0 and 15 having special
> > meaning so can'r be allocated. Bitmaps give me a nice way to ensure we dont
> > use those by masking these and above 15... IDR uses bitmap with stuff on top
> > which maynot be helpful here as I need a number 1 to 14. For a generic, give
> > me a number IDRs are very useful.
>
> Perhaps we need some comments or something explaining the constraints
> here to stop people doing misguided cleanups?

Sure, it is already explained at scattered places, will add this comment here
as well.

--
~Vinod
\
 
 \ /
  Last update: 2017-11-17 17:18    [W:0.047 / U:4.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site