Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1805346pxp; Sat, 12 Mar 2022 23:25:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuJa6QOHXUJf82Mo/vFTHHvbOFsdMPsioa85yc2KCmcyZ1fSREdJYe7ofO8Ito26y04WDA X-Received: by 2002:a17:906:4fc7:b0:6da:92b2:f572 with SMTP id i7-20020a1709064fc700b006da92b2f572mr14481381ejw.184.1647156320666; Sat, 12 Mar 2022 23:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647156320; cv=none; d=google.com; s=arc-20160816; b=mg0jHnomlZ4wxoC1mckjhV701h7oplyeJCTnm60nfTZtRuH9lMcl5r7w4Em0MR/Adt cBSl6QeqmKZ+WzUvHr51oqYu1GavEBoeQg4XKjbhbHZ+13UkTmiIlMSwGcgnKNBvqcla JWDGvkrrWcX7Jn68W00rP+rxPe/BsZvg1AkCQWX1hsVEAIHJzxi5cyvV7MI6JHSrWjUl G0CqrExmI+pnEbG/m5BQXDCWs6Uv8PeyOyqaR16f0FOUmUkSh8Nh1rJBpMyowaZW0mBa G+t95kGT51d42G5OPiRD8YMfPrQocOzsxqtHLFzcuO5TvXZEUyXG3ZdBAPBO3VIEJLIT SKlg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=41OBeTclfUqu9E10Glc2yaP92LM2mbCEsKFyGzia5ns=; b=tpRSU5Zf8dtNtac9dCzM6B8T9ola3cJiVyUopsprbPqIWNsxQ7qgnQJPoah64JMgTT SF2jlEbwpkSv7wsmxzXdYFu1pBkSmqDEtPl0yC7r290gMnWLuydqM13bXI/446jls08E s8JsNMd3oP8Vq5CcKgKelpqxVZCHVePid6ShGvVxMVfa9FIfPdDQMMNL+vPT6XVUJvBD HusoLaBnx25rXx3LDGuuJR0BNMSEAtblQsFosZbCpqeqzV/jFTAUk+wlEuckABcRNhnu T6w8v0SJNkIv57l6/Vanh/14OboTiaR+t5V/+jorXQxRh7Ag1v8AuL0Tr1U+3DBLvw9F UEpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Bcn6TJQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c26-20020a056402143a00b00412b6b680ffsi7304534edx.412.2022.03.12.23.24.56; Sat, 12 Mar 2022 23:25:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Bcn6TJQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232825AbiCLWmz (ORCPT + 99 others); Sat, 12 Mar 2022 17:42:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbiCLWmy (ORCPT ); Sat, 12 Mar 2022 17:42:54 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B581C2F78; Sat, 12 Mar 2022 14:41:48 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id E854422239; Sat, 12 Mar 2022 23:41:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1647124906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=41OBeTclfUqu9E10Glc2yaP92LM2mbCEsKFyGzia5ns=; b=Bcn6TJQ5PIRq9iL30BAkPa0a8pZNAeeweCiUUFVv+KPsAq9+0DdqDKkFsyjIS7dpq4sim6 C+/u3gQgAL2fZqiP748QRXdhRJ2zkqBpLsk1qEF5tOZqGeDzmw8ZZHFI7M/gwtxYO8wnBt 3d1Oull4pGs6zUkgaUiE8/unIaV7tJk= From: Michael Walle To: Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Colin Foster Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH net] net: mdio: mscc-miim: fix duplicate debugfs entry Date: Sat, 12 Mar 2022 23:41:40 +0100 Message-Id: <20220312224140.4173930-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This driver can have up to two regmaps. If the second one is registered its debugfs entry will have the same name as the first one and the following error will be printed: [ 3.833521] debugfs: Directory 'e200413c.mdio' with parent 'regmap' already present! Give the second regmap a name to avoid this. Fixes: a27a76282837 ("net: mdio: mscc-miim: convert to a regmap implementation") Signed-off-by: Michael Walle --- drivers/net/mdio/mdio-mscc-miim.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/mdio/mdio-mscc-miim.c b/drivers/net/mdio/mdio-mscc-miim.c index dfd7f3001a15..fc5655328b1f 100644 --- a/drivers/net/mdio/mdio-mscc-miim.c +++ b/drivers/net/mdio/mdio-mscc-miim.c @@ -197,6 +197,13 @@ static const struct regmap_config mscc_miim_regmap_config = { .reg_stride = 4, }; +static const struct regmap_config mscc_miim_phy_regmap_config = { + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, + .name = "phy", +}; + int mscc_miim_setup(struct device *dev, struct mii_bus **pbus, const char *name, struct regmap *mii_regmap, int status_offset) { @@ -260,7 +267,7 @@ static int mscc_miim_probe(struct platform_device *pdev) } phy_regmap = devm_regmap_init_mmio(&pdev->dev, phy_regs, - &mscc_miim_regmap_config); + &mscc_miim_phy_regmap_config); if (IS_ERR(phy_regmap)) { dev_err(&pdev->dev, "Unable to create phy register regmap\n"); return PTR_ERR(phy_regmap); -- 2.30.2