From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
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
Subject: Re: [PATCH v2] soundwire: debugfs: use controller id and link_id for debugfs
Date: Tue, 7 Sep 2021 10:44:31 -0500 [thread overview]
Message-ID: <53297f34-2353-868d-617b-d9339223799c@linux.intel.com> (raw)
In-Reply-To: <20210907105332.1257-1-srinivas.kandagatla@linaro.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 <srinivas.kandagatla@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> 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);
> }
>
>
next prev parent reply other threads:[~2021-09-07 16:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 10:53 [PATCH v2] soundwire: debugfs: use controller id and link_id for debugfs Srinivas Kandagatla
2021-09-07 15:44 ` Pierre-Louis Bossart [this message]
2021-10-01 4:23 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53297f34-2353-868d-617b-d9339223799c@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sanyog.r.kale@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).