From patchwork Mon Mar 1 16:10:47 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: 388683 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3580662jap; Mon, 1 Mar 2021 10:18:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMA5YZtLJXpaF3PjUBIh30FnZuJ84K3uSOXsjDVoBfZr1Mj9lUQq+M3XUp66RCqHwrFQ1S X-Received: by 2002:a05:6402:9:: with SMTP id d9mr11518913edu.67.1614622737212; Mon, 01 Mar 2021 10:18:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614622737; cv=none; d=google.com; s=arc-20160816; b=c+MdZQl9E5lTtuu7s63a9mQFuibpcKIHdfLLIJf8bmUaiRBWaqL9nLqU+TLOJXkYP8 u0yswvRoOSXFHFLOIy6g+dNIr1rX9Bje2Y8SeM05d9rX387cySsEfl8ZQRKKgYzU8KnM hedaJiZIH081VmqVe8R0hd2RGegGVrD6aZfuzj8necbeL8mtdRAOHZa59ncZGs4zQzlN zucyisfW8aOCI5yJ84JzjdbJH+7/plT+nLU/+rtnaHxhZaWJNGE7U1T8q1AKRC6L2SHb VgLs6f6ME7CV6VS/WCdu8KD//Atgs0vd19vAOoFedmdsD/1PtApG5SDVQ2iRH7BJmS36 Lp9Q== 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=nPpt5FGchwVeR98N2EB7XtyOR2dQAVpGU0Gry4++BAmNuJAVI2E4WiAS3uZZMiOryW OesUZxE56OBnvYARxYeCyh2lLHJ1OZFpvY9LpgfENrFynWMI5U31GiPJ8NybHTcFfKWQ 9Em/kuK03I1J8eOU2xok5o7nfNn/Qu3E9K3KVeRBC29N7S2n/ppP+/ECLdNF3Wd2f4+M Nz0OBIDeWoMYGtHcCcbJPm2+qoAIwayhDPMaAZicWqPzcan8hsYdk/ghy36Sc2rIy11B w6pdj3w6qfejxnqI7I5Tt1Qb/l6yDCkKfSko6HTXHVnuSAayc5zxZlL0XHerI9MNvT2j xwtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zB3cvoXh; 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 dp16si12237248ejc.49.2021.03.01.10.18.57; Mon, 01 Mar 2021 10:18:57 -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=zB3cvoXh; 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 S239634AbhCASSM (ORCPT + 13 others); Mon, 1 Mar 2021 13:18:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:34040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239355AbhCASLo (ORCPT ); Mon, 1 Mar 2021 13:11:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 852B96505A; Mon, 1 Mar 2021 17:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619369; bh=SJqU0TZ8Afa3m2csUA70f/J8HZUD0M9F9MqfyYzU4jE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zB3cvoXhvOd8talo+kpO//L/gLF7Krl/zlVLjn6EdM/J8IdJgYKzNPIvgiTW68WUv kwSZhzEEHBMuJiHhPrt439eaV2NaWPNbD8HxkhSThGqEnokHFRXsl/TlFbPXKsfke7 x4rQyYc7F7y9OdexWto0Puaiz/sBWxoYMt8R4eog= 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.10 399/663] soundwire: debugfs: use controller id instead of link_id Date: Mon, 1 Mar 2021 17:10:47 +0100 Message-Id: <20210301161201.609666062@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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); }