Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3864953pxb; Tue, 7 Sep 2021 09:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNsazYzZvDvmyLb2udWPk+G96OUdPoEIM8F49mGPrSVR5TB6viJxDBQANi4AS4Lla47Fop X-Received: by 2002:a5d:4043:: with SMTP id w3mr19802439wrp.15.1631031027811; Tue, 07 Sep 2021 09:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631031027; cv=none; d=google.com; s=arc-20160816; b=WSxPoaviLTg+h0eDr87N6Xzt9vKAv5mxbHodxIvRaX5jNC7+2wTFJRIhwp2ZhBgGDC zj5NX/gfFEirQtrgesnYQglNnlePMa4ksi/a3rpSQf7WtjXT4YKgBBblxKixA40M0weA F92fUSU7NxqeVEv8dchWX4Z707YVAu9n4UhAiyCME4OpFDCi3qNkoc3lzZaB0wtng9QJ XaXblGZ2uiraaaKGg7f1uQxery65jtdqMEdCYz8EYUJr4ESEYs+zddNFg0+1pVSYGYuk KyFzx8Xzyb9wkFgn2c1pNjhp7Awsi6Nml0SnxW95GSzHVNAa6CR0EgF3/opMDiG91Dya PVpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=AUgG4zcYcOT1PilXwyc0LAsmM+nxdRlfAlQATV1uUms=; b=VHVYBPQ9GuO7WjB9w0xwxI0l/UEjLY3UZDKImoOzAY830caC4UND7tZy/mPTY/tShP HxpnimVPy/6ZODoQEI9ytWZzwL4TcwERVatF9lqmXBlvReNPajtTWYUkw3E7EwtCp7Yx A0xilCNG2bWCl0VIN5ZR5WTQVpkXsPV13ALEhe4tUYf6aosRBY7wut1ylxb7M1exHcIC K1yhJumnvADc6eOVry6hf0OrhmLt+V5nzWTmLJHutPqqsuseuPLSN2CSL3ediMaHG14h elshY/I9D5AKWi3EYMV54Nsf+wyW8au2/B/8RmuKaOcvlZ0K2ND+MKiraXdv7DMfl/OH kW9A== 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 8si12629413ejx.341.2021.09.07.09.10.03; Tue, 07 Sep 2021 09:10:27 -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 S244135AbhIGQJh (ORCPT + 99 others); Tue, 7 Sep 2021 12:09:37 -0400 Received: from mga17.intel.com ([192.55.52.151]:31931 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245639AbhIGQJg (ORCPT ); Tue, 7 Sep 2021 12:09:36 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="200445740" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="200445740" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 09:06:13 -0700 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="512893461" Received: from mrburno-mobl.amr.corp.intel.com (HELO [10.212.10.81]) ([10.212.10.81]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 09:06:12 -0700 Subject: Re: [PATCH v2] soundwire: debugfs: use controller id and link_id for debugfs To: Srinivas Kandagatla , vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: sanyog.r.kale@intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20210907105332.1257-1-srinivas.kandagatla@linaro.org> From: Pierre-Louis Bossart Message-ID: <53297f34-2353-868d-617b-d9339223799c@linux.intel.com> Date: Tue, 7 Sep 2021 10:44:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210907105332.1257-1-srinivas.kandagatla@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/21 5:53 AM, Srinivas Kandagatla wrote: > link_id can be zero and if we have multiple controller instances > in a system like Qualcomm debugfs will end-up with duplicate namespace > resulting in incorrect debugfs entries. > > Using bus-id and link-id combination should give a unique debugfs directory > entry and should fix below warning too. > "debugfs: Directory 'master-0' with parent 'soundwire' already present!" > > Fixes: bf03473d5bcc ("soundwire: add debugfs support") > Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart > --- > Changes since v1: > Added Link ID along with bus id. > > drivers/soundwire/debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c > index b6cad0d59b7b..49900cd207bc 100644 > --- a/drivers/soundwire/debugfs.c > +++ b/drivers/soundwire/debugfs.c > @@ -19,7 +19,7 @@ void sdw_bus_debugfs_init(struct sdw_bus *bus) > return; > > /* create the debugfs master-N */ > - snprintf(name, sizeof(name), "master-%d", bus->link_id); > + snprintf(name, sizeof(name), "master-%d-%d", bus->id, bus->link_id); > bus->debugfs = debugfs_create_dir(name, sdw_debugfs_root); > } > >