Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2850665pxa; Mon, 17 Aug 2020 22:42:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx880nxYQjrzNhi5FVpH7FqJ62hAsk5OdxRKVR0hROutdcxakbgOrA0mTzjb6L96rX18s+4 X-Received: by 2002:aa7:da87:: with SMTP id q7mr17835205eds.166.1597729370700; Mon, 17 Aug 2020 22:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597729370; cv=none; d=google.com; s=arc-20160816; b=egNURVNdY8yhYwIPAVbY6CnDp97VFtDTbMtQO8/VSGYSymNSq85PVe8iivZgNJrCHB TZ8SfFwXQ1cww0+WQLWYiK/DEh+TBuQYxa+AWNCzpd0qeseiZ316Bvsl76pS5KWs4DLW 51WxWcBXggwJsNgeQ1JYK3lGLqL2u9POjTdnCT8RnNDAjltI0jI8pH50hI9x+4VQDMr2 +N5UXwH7QtsZwpBOxkKIG/4r0jOwbBtkcFza8/SIMUu5XfpPCkVRGdwc/3ciyEWz2j8l BD/UdnIvEF9CklrZ4ImK36KWTbgqTcjuLiE/wxF0XGlx0l5iWiDiJNb7r3U3/f3J0Oii VOTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=hi7w5kw6r6yTwa0wSxcrjh+/C/8CyqPoA472oAhfIBE=; b=kM0MMYYfTrDEaokY+mgNMLypP6L+7AesG2ZTeKF5suyHitwsKhtBgZLBDEWMUtVQSW IjPyyf098rs0naMkXwJaPjVP0XopB2etW7DZoDe2F4AJD+wx/iVfU1S/0izTzt8JNuW0 eY42kcT98BLrxd5sYef1cfM55P4qGpJh3f3SiyrBOz5gvbnZ0tsTBm355qvG/tx/U/sD H0YpesiWUjO32VDftiZNK6S/rppZR96aDzAO1o5g+BPy/xkEUJfsdqsSxMbRwfYJtt+c FfCkJ0lrTUVZZ9E4QthxaMfqImbr+KDkjhKG6tsaEo1RpRFSnc1ff1VuON2vBENiPLDg TRuA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si12651448edz.180.2020.08.17.22.42.26; Mon, 17 Aug 2020 22:42:50 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgHRFl0 (ORCPT + 99 others); Tue, 18 Aug 2020 01:41:26 -0400 Received: from mga11.intel.com ([192.55.52.93]:36469 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726382AbgHRFlZ (ORCPT ); Tue, 18 Aug 2020 01:41:25 -0400 IronPort-SDR: ygMYQgUH4/b2xRsnP5nsGFx5COmglrI/1iKwuItVWXKHGAkWZMMsMqPjo9MzwNSJWqq+BB+m5p 8ehHEBeaRN9A== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="152477971" X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="152477971" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2020 22:41:24 -0700 IronPort-SDR: q6vq7fQJDA/syxlOKE9XCNTj6MPmYV6xF0yedEVuplfQTxSfka3FiYfSsCdSxK9+sNOG8ma5cz mIl6K1+bwiUA== X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="471678380" Received: from bard-ubuntu.sh.intel.com ([10.239.13.33]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2020 22:41:20 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.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: [PATCH 1/2] soundwire: add definition for maximum number of ports Date: Tue, 18 Aug 2020 01:47:26 +0800 Message-Id: <20200817174727.15139-2-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817174727.15139-1-yung-chuan.liao@linux.intel.com> References: <20200817174727.15139-1-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 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) enum { SDW_PORT_DIRN_SINK = 0, -- 2.17.1