Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2875885pxa; Mon, 17 Aug 2020 23:38:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG7RXqcu3sDdzunTVgzh1JEtgZOGk8NXHuV2ijw+8WQE7aTLHiQrlbfEuMdhGHeDebY2rP X-Received: by 2002:a50:bf07:: with SMTP id f7mr18713967edk.356.1597732708462; Mon, 17 Aug 2020 23:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597732708; cv=none; d=google.com; s=arc-20160816; b=ybrWQZa37DRB1s8vPBn1y3hopef2DnepqfKyZdGB+cWVxBHjNoZ9ivHzacXAj2+QO7 PLeYUUdTv2EYuCxgsXUQMrDwqdLNYNpD8zF8d4DCreC4a6hSaaFZp9j+ca/oXh0bOj8U 8awo+rYf4AdrPI7AaQ6SGEifhxuMlhdIEilZt2T5J1OS/CQPwdrt4PV7k1liIwBQACNO sw5f2xe+gtsEAAvamPpsUkvJiCBIbFMFvwWx2rynxMPLNFuOmHVh8Q+mO+G3rnRKtFUI cL4JoHKyJldmE28bXEOk+/F18Om80QbralqmY1/rzPEFkMDd3ugVtKIH2xNa0EN/i5qW N0UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=RRu5XWMoOJcw7hJdHQehGJ/U1XDAjJOMBWXkPEybSj4=; b=bVveP5SxP5iTfVA28d3CBytLWJbQ8YE3EIJa3zUJQUjJs/0j8jwEvwHk1YmfiAUhL0 l5sWJnx5QWQCK32YaxTvV4U6DXnXgoXDI2BmfXUDytd5MVnlEuxAYyjru6btHlSt+Jec Dd/QSdwaDiU/E3QYK33C7H8NMitUuOZGDSHTGofgBpz6klXBFCuOOXMIIiHbVTpkEPy8 BCLdubtRJF4/oQ7s4ebdYMIRRQ2FnkN0nUa4+k5hV/7ksi0H19rNEJf45Zx1c3JKhPyz 8FsI2XlVTQeEP7Xd2bq9Ot3Xznnww1c7ayvA7bPwnMUNGujDaZv1HzQI/bb2zMgdEJek yk8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nSJ7DxFd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si12934272eja.38.2020.08.17.23.38.05; Mon, 17 Aug 2020 23:38:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nSJ7DxFd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726473AbgHRGfn (ORCPT + 99 others); Tue, 18 Aug 2020 02:35:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgHRGfn (ORCPT ); Tue, 18 Aug 2020 02:35:43 -0400 Received: from localhost (unknown [122.171.38.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C44E12067C; Tue, 18 Aug 2020 06:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597732542; bh=rUWChlbE1aEqHYoPTipxMradvFr9SB3+1uYoSmaW41M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nSJ7DxFdS8XCIJZS6ZR/Q+tyQpdWUjU4vJ3uF06Gv2W4Edqk0XRTBXlX3MXzGt0DM Ag99XVItHAqKF13elvod9mX712p8zYG67xU3mEEXpvNbpjpv3fOPdfiAGLx2ck7WQ8 nQS8jQaoGcvOEtUu1uPObUPO9twz6BEM9vNscL5s= Date: Tue, 18 Aug 2020 12:05:38 +0530 From: Vinod Koul To: Bard Liao Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: Re: [PATCH 1/2] soundwire: add definition for maximum number of ports Message-ID: <20200818063538.GV2639@vkoul-mobl> References: <20200817174727.15139-1-yung-chuan.liao@linux.intel.com> <20200817174727.15139-2-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200817174727.15139-2-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-08-20, 01:47, Bard Liao wrote: > From: Pierre-Louis Bossart > > A Device may have at most 15 physical ports (DP0, DP1..DP14). > > Signed-off-by: Pierre-Louis Bossart > Reviewed-by: Rander Wang > Reviewed-by: Guennadi Liakhovetski > Signed-off-by: Bard Liao > --- > include/linux/soundwire/sdw.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h > index 76052f12c9f7..0aa4c6af7554 100644 > --- a/include/linux/soundwire/sdw.h > +++ b/include/linux/soundwire/sdw.h > @@ -38,7 +38,8 @@ struct sdw_slave; > #define SDW_FRAME_CTRL_BITS 48 > #define SDW_MAX_DEVICES 11 > > -#define SDW_VALID_PORT_RANGE(n) ((n) <= 14 && (n) >= 1) > +#define SDW_MAX_PORTS 15 > +#define SDW_VALID_PORT_RANGE(n) ((n) < SDW_MAX_PORTS && (n) >= 1) What is the use of this one if we are allocating all ports always, Also, I dont see it used in second patch? > > enum { > SDW_PORT_DIRN_SINK = 0, > -- > 2.17.1 -- ~Vinod