Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2882939pxa; Mon, 17 Aug 2020 23:56:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/+an58UhlbbOUW5V1AR705VoJ+aQdXc2Eu5gS9R+t+BoxLzNa22wkU3riIVN2LeEYEVTi X-Received: by 2002:a05:6402:7c7:: with SMTP id u7mr16371605edy.283.1597733777814; Mon, 17 Aug 2020 23:56:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1597733777; cv=pass; d=google.com; s=arc-20160816; b=WbebFAe7Vld7ZPays8YURp7h3ZXHPhMl7pX9aMdJ0545vxnX0LoRIIOV89uv4xfsAW oJN5jOODD6fhR03pHCoQdKXNKe2VECEp6Wb7xVRFVZrE0pOF0u/Z6ooZTGOAGnUd/My3 6+eA0mOcvkuVvNOTigjLvNvK1tsh8D20SSPg5IdFkp/IQ2bzuc3C7+/Tej7uGpu9gvb2 q0WE+KQ31/egU6WX6cFiuDCWjzKen1Wm62m5zFAOVPXuej4JR0qD0KiU49UjuMNAyXHa 5btPffpWidbFcdKdO+jR09i1ui5X4OmxEenLUycmflQt+dUVGGRA9iPrhFnZF5/0s/WZ GySA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-product:dlp-reaction:dlp-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:ironport-sdr :ironport-sdr; bh=caibVuZKzfJh0S0Hnqs9hLZGAMR2x3hXhmmiYbnpvoc=; b=YXuNSjRNtLJIw8e4fhSnnGof9cIjOshMlVWit9q9xpIx2hFJwv/LG/ANMvEqUhoPUh k8cG8IAEjvq0ZQAzUR7ax0H9khCC0o42pOD7LaAk7UYc33kOSU6ZBlcck0VwtKlji7Bt NOPLnC6uOfQJWZ5Jw8neq5x7cV+vvUXB7NCUdQZGMOE55Kz7JNEpbZo7jbWC9dh8wcT4 +ZEPbCPMH6/7OdQgPa63S4Ah/rk3//lGrAtPd6K1S2LS4eVr16sfR938Rqa8KqvoUrcP Xlho8M+9k0ysrcuntgbVwa79M1mIffaZwg0llUJB8Xlluo8Gl0gdrSRIQIy4WMIpJhUf a/8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=zRQv5bHR; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.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 d2si14084334ejm.717.2020.08.17.23.55.53; Mon, 17 Aug 2020 23:56:17 -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=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=zRQv5bHR; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.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 S1726303AbgHRGxR (ORCPT + 99 others); Tue, 18 Aug 2020 02:53:17 -0400 Received: from mga12.intel.com ([192.55.52.136]:12149 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbgHRGxN (ORCPT ); Tue, 18 Aug 2020 02:53:13 -0400 IronPort-SDR: iCRE8/yTGGxWFc50yOBIiJsxLGbjivM0PdBlY1EOS4ho4sDBpyPSc1kmdKRcFlXrDwbkudm4L9 2lJxNjgTKBuQ== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="134373703" X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="134373703" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2020 23:53:12 -0700 IronPort-SDR: BDfQ+H3/mW5WVADCzkX9OmoWX0ZyabG24ib7/I8otiEHyNG1h5cMPjNd+gfpwTCtoNSLYWzPne syyvhKz2JaFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,326,1592895600"; d="scan'208";a="471693982" Received: from orsmsx602-2.jf.intel.com (HELO ORSMSX602.amr.corp.intel.com) ([10.22.229.82]) by orsmga005.jf.intel.com with ESMTP; 17 Aug 2020 23:53:08 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 17 Aug 2020 23:53:08 -0700 Received: from orsmsx162.amr.corp.intel.com (10.22.240.85) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 17 Aug 2020 23:53:08 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX162.amr.corp.intel.com (10.22.240.85) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Aug 2020 23:53:07 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Aug 2020 23:53:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwHzeE1u5VJ4RsYnN9HKCmwxLFAniEqytrhfqQ1EcnvJtRXH5+TaweFQm88OS1nSEwAQlWTemT+DC735OnAp/WLlwzMeVrh2JWKPbkDknx7rtsX0k5inygfDhfKcFQI/AOqPm9M69DZQ0eBE01ooocU6JQmEufX81/EyjC8PG6uXTLBh7uGwyL7XGg3Ven28QrI/tJonleN1oYnY2+FycxEy1gNPgo00UQu6xtEnZpHW1DC1FyN898huOYFMWvJzUEnV4qowAz0q0WQLYJFvoOInOxRDTUURp93zVR1EqY0FM2O34tyxClNElN/hbF1gWQPHY4MVhbtCjvy7gj6Zhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=caibVuZKzfJh0S0Hnqs9hLZGAMR2x3hXhmmiYbnpvoc=; b=Lwog5vHHo6TBH2aBulrt9ypWGebdJFGcx2G9zIQ34mg61BwIFoSso3ybIPJfkWqoC35X1el9sM6kOhBbTUhjkT00mPvmYbedWBJ/nlXhhsmXmy+7QH3L0T9/5Ia8Z51lG/N52mDsewlHOdSfsFEGCicSu39pcVR7lBt9HZOXNxgpe6r2PT9LPJ7irQbLGE9fzKrdLZG455DdfRM3wNaLKka/8o8Qc2WA+q6sQMs5SyxReyOWY7KlflJqGeXS2+ZKu6Iq8HLvO1Y+iyY+wIIwZCKaP5ZRMoTU9l0N1Xbv8gEAwimwBSUnefy45ag2bO5KAwWi+03B8Og60Mv5k53TeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=caibVuZKzfJh0S0Hnqs9hLZGAMR2x3hXhmmiYbnpvoc=; b=zRQv5bHR8jWFE7xj4qbjwABCSG/wvazXrqh9J9b1M6KXvr0dEYrCK7zipxKXJ3lANBxW5wkLypaKwl9rG9y9cLaVhfkdrmBd2tdufWflquOBoNzdqPKRNtwnuE+2Fdq+oaJiFbDzE7koqVVNXQmwBkpDAS/T+CikXiN7EP+biQs= Received: from DM6PR11MB4074.namprd11.prod.outlook.com (2603:10b6:5:5::11) by DM5PR1101MB2107.namprd11.prod.outlook.com (2603:10b6:4:5a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Tue, 18 Aug 2020 06:53:06 +0000 Received: from DM6PR11MB4074.namprd11.prod.outlook.com ([fe80::a061:bd5e:c46a:fa40]) by DM6PR11MB4074.namprd11.prod.outlook.com ([fe80::a061:bd5e:c46a:fa40%3]) with mapi id 15.20.3283.028; Tue, 18 Aug 2020 06:53:06 +0000 From: "Liao, Bard" To: Vinod Koul , 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" , "Kale, Sanyog R" , "Lin, Mengdong" Subject: RE: [PATCH 1/2] soundwire: add definition for maximum number of ports Thread-Topic: [PATCH 1/2] soundwire: add definition for maximum number of ports Thread-Index: AQHWdSI8ybKAPOyQqUWJUXX/RtQZPKk9aU0AgAAEipA= Date: Tue, 18 Aug 2020 06:53:05 +0000 Message-ID: References: <20200817174727.15139-1-yung-chuan.liao@linux.intel.com> <20200817174727.15139-2-yung-chuan.liao@linux.intel.com> <20200818063538.GV2639@vkoul-mobl> In-Reply-To: <20200818063538.GV2639@vkoul-mobl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [220.133.4.96] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c32739f4-7b2b-40f3-029e-08d843435c1b x-ms-traffictypediagnostic: DM5PR1101MB2107: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: C9G4StQvuwrnIoGwjfKnyipoWIWA2lM/M9mARiGfEiL51ttwQXPvzZFPopaxaKBTgrv+OW+CSKkitsq776DaxlLgaU/t561IEw0kPsi4eTzC++As8jQxVyoapAjQD9/ot7GzqcyS/J/Yq79CTxr0VQ+s54ihxDgsrHNd1wad3TJFbk4y/3sdjmTBEXvA96iuOTiyOZHEuJxZuWymwQ7V8J5hMcgBqJeJTUnMbZo86ETb1U7NNrfRw2yaTOxejfBnU25ShrqJYAAB3eV+FDK6GtKGaF5qo+ztWMx51Fjdy6YEA3kBq6iskCS6P2ZU6DtdYZZrIA8bgf6JNJ14HyHukA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4074.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(346002)(136003)(366004)(39860400002)(316002)(4326008)(7696005)(26005)(54906003)(53546011)(6506007)(71200400001)(9686003)(52536014)(55016002)(186003)(110136005)(478600001)(66556008)(64756008)(66446008)(7416002)(86362001)(83380400001)(8676002)(2906002)(33656002)(76116006)(5660300002)(66476007)(66946007)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: O33brgqi6+54FfF12jfBCsszHnKwvuPOCVo2A7lTsftc5bYMeMjZwmU3LJyYg8fvVa2vjdgsU2wDNBqtDKU8SndTgwxX5E/DNfbKe/FDHL/X2Cah2fTeSgFz2JnopUxb487BpGSW1SfJwPgX9WR2FZqWfyWLmAhrNEYTONE4dgPJeY7r/nvtAP70PG/EYRSCgdMIzQfD6ZIftxhiAhnfixDFKUaEzMFW2hcdfHI3/Nuv1LxLT9gZvZ2VYtT0bB7DeTrT7o7z9aDfgOUNFnFEniPMLDHLL4K4SJQqCm6N1CPRSTRQVi1QSLr3rEYViRH9ON8IN/6WT4g5aKv7mOi2aBlybNAJ2gvBnDq7evczfiAhxKfYlrG78tEje5HkXhfhAua9PKtYBoDcv4U5b7K9/tJuKuDNBWrFM+rWBMq2WOAxWsPxNfVYHfkjJdtvgQcHt5gLUBZlblRznD4rYeu76zHU4nUekG5cBKLSyfSF5fQQJJ8RgpWw/sQ/FrOYM9E6mDYxN21csGB+OzTPd/OUDmzk1IL/z0xwi30p6jXGYzk0WNw6VzcglDQZjXI9lVdoJOvLKhrww77Jgih30nWFCBtFBDknb/KG7w3W2oaq5C+LHDj4vBLYeus2yVDl0pgqQV87sHcFHp0z3mcb88gpUw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4074.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c32739f4-7b2b-40f3-029e-08d843435c1b X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2020 06:53:05.8320 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XO2yjdj4Ubcm/JIhzFuefpHzrSDGQ0Zb4yOJt3hBWqnA5pG/LuMz3n9lhJ84Jz3mtTIp/cmjI7LDbuuKeSuSrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2107 X-OriginatorOrg: intel.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Vinod Koul > Sent: Tuesday, August 18, 2020 2:36 PM > 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; Kale, Sanyog R ; = Lin, > Mengdong ; Liao, Bard > Subject: Re: [PATCH 1/2] soundwire: add definition for maximum number of > ports >=20 > 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) <=3D 14 && (n) >=3D 1) > > +#define SDW_MAX_PORTS 15 > > +#define SDW_VALID_PORT_RANGE(n) ((n) < > SDW_MAX_PORTS && (n) >=3D 1) >=20 > What is the use of this one if we are allocating all ports always, Also, = I dont > see it used in second patch? It is used in drivers/soundwire/stream.c and drivers/soundwire/debugfs.c. >=20 > > > > enum { > > SDW_PORT_DIRN_SINK =3D 0, > > -- > > 2.17.1 >=20 > -- > ~Vinod