From patchwork Mon Mar 1 16:10:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 388734 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3659256jap; Mon, 1 Mar 2021 12:11:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4l/u8UJp4W3KrYJTZ1zjxXg6Rql+Rm2NFbItYQoWyk6Bc3ITQ8GhCBwmY2LWiD4jlrw5Q X-Received: by 2002:a05:6402:1613:: with SMTP id f19mr10214257edv.222.1614629379836; Mon, 01 Mar 2021 12:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614629379; cv=none; d=google.com; s=arc-20160816; b=r64SIUf1FPz0mAw6m09sTBzyQLj1VdTcIbS8LVUqffXXgrpuAnr3pcg5UMBKDHF9vs EqK+GhRwHaSRXuPJOrYd+l7NiOcEktFa5w4FXvbqQrOo9jqKTtaBdkdI9Al0kbe67XCx ayOqybgVOWMa8QUSWdu3izpmcruopihLeOIQE5nrKEfZSej9ydqBJwnHJKto7jn6/ZMp h4x3mu0fVbFLrzBWlxES2BoBqBKiqnp/tW8btFrnQNqFkGrIPBoRgG00zTnim+saAsxP Sg9v7zyAjcHjxIDwwFTdSx6My9lNz1Z9k5NRQBratokBfFON0pqlbHpXtHZPQqlHL40V D1vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7Lv5/y9F14dmjvPc+atmYTeaS+lDtBCuteWanjNlB6A=; b=xcKH1wPG3dGU6+1toJq1sPnbMyS9Pj6tsIpeIuq7hUyEV9+GbLO/Qi7+S/NydO4rq6 +rhTnZvT06OeaAIOD8Rwz0Ai9JR8BylNtJYjdZsF76uo8wW+Wrt+E5sRs1CdBKIEnHHP qRon36OgYorSvcNlq6qYjzYa+C88nf8iRwahLCUb9aob7PIbN3Ukk3qVx1j6aLzkAQ2B uRfH6z0CwczQpMQVQvgiq4ENqeVhnEZQOUNl7FA2T2kzPSStXIfoqbAlp4k0b8Q78jeU Fp1ZmbVP20bUvse8VPcwuolQLeIxvAWPuV0L1XppskWUDhcxaZhtnVC832hzmW0dG+3g QU2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pkpWm2d3; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e26si12039502edr.556.2021.03.01.12.09.39; Mon, 01 Mar 2021 12:09:39 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=pkpWm2d3; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242925AbhCAUIr (ORCPT + 13 others); Mon, 1 Mar 2021 15:08:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:33596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241404AbhCAT5J (ORCPT ); Mon, 1 Mar 2021 14:57:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 29BD465383; Mon, 1 Mar 2021 17:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614621349; bh=SJqU0TZ8Afa3m2csUA70f/J8HZUD0M9F9MqfyYzU4jE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pkpWm2d3mncYikr+IXDN+ZpavkOt5CE4pyrf1N4EOGPg/d4I9jjexkLsiq9VxqKth AAV9jL4K45oXG4gGgCKFKYnRML6hAKUAleBXUzQhXp6IbnybjZuBTXRHKEBBYdOGae npaZHPmodgwPBisP5XpWZqpDYiQ2KVYrRhC0vHeg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Vinod Koul , Sasha Levin Subject: [PATCH 5.11 483/775] soundwire: debugfs: use controller id instead of link_id Date: Mon, 1 Mar 2021 17:10:51 +0100 Message-Id: <20210301161225.401517398@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 6d5e7af1f6f5924de5dd1ebe97675c2363100878 ] 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 id 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 Link: https://lore.kernel.org/r/20210115162559.20869-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.27.0 diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c index b6cad0d59b7b9..5f9efa42bb25b 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", bus->id); bus->debugfs = debugfs_create_dir(name, sdw_debugfs_root); }