From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760301AbdKPRbz (ORCPT ); Thu, 16 Nov 2017 12:31:55 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:42764 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759961AbdKPRal (ORCPT ); Thu, 16 Nov 2017 12:30:41 -0500 Date: Thu, 16 Nov 2017 17:30:24 +0000 From: Mark Brown To: Vinod Koul Cc: Srinivas Kandagatla , Greg Kroah-Hartman , LKML , ALSA , Takashi , Pierre , Sanyog Kale , Shreyas NC , patches.audio@intel.com, alan@linux.intel.com, Charles Keepax , Sagar Dharia , plai@codeaurora.org, Sudheer Papothi Subject: Re: [PATCH v2 03/14] soundwire: Add Master registration Message-ID: <20171116173024.owiotfwriclu2won@sirena.org.uk> References: <1510314556-13002-1-git-send-email-vinod.koul@intel.com> <1510314556-13002-4-git-send-email-vinod.koul@intel.com> <2ba56597-2178-6389-bc4d-153a17505981@linaro.org> <20171116164944.GC3187@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3lfb2wtppqddt5wa" Content-Disposition: inline In-Reply-To: <20171116164944.GC3187@localhost> X-Cookie: Nothing is but what is not. User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3lfb2wtppqddt5wa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? --3lfb2wtppqddt5wa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAloNyy4ACgkQJNaLcl1U h9AwHgf/U1yjfTdPmXXBjMg8Hweoij7JLUFnHh5LybuiY5KIcWEOCRg3LEPwBLLF caFGQnKe4+actb14AN8MuUXXxgZKkh3f4JpkQuRsSfrobdPHDoSPDTj2vwth0MU7 FlEqDTyzgMtFR4UoVFY7e0ZBsn7uSXjCSixvs2Kui/XYZs+FDXXwwNjVFVz0QBNX LouqFv1qyhvYV6crUEE+5RHMN59LsjO4l/JcPR08W2Km2TmIgNPyoJZLWduWebLJ q0wF+vqdw+u/zAiV57PHf/Y1cA4JWPPLzu0gwu43yIx2ShSzSLWc03QBHzWUsE7y GtKtD9tWzcwd83EB63pnMnxreUzX1A== =QZQ/ -----END PGP SIGNATURE----- --3lfb2wtppqddt5wa--