[alsa-devel] [PATCH v2 03/14] soundwire: Add Master registration

Mark Brown broonie at kernel.org
Thu Nov 16 18:30:24 CET 2017


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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20171116/9814b48c/attachment-0001.sig>


More information about the Alsa-devel mailing list