Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11380896rwd; Thu, 22 Jun 2023 12:27:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lmDDNUN1WlxQtzgLIdOZGjnEy8XoIal3osoStwe8s28DzpU7P27D65ajOA27c2InSIrhl X-Received: by 2002:a17:902:d48a:b0:1b6:c193:96e4 with SMTP id c10-20020a170902d48a00b001b6c19396e4mr225448plg.69.1687462062627; Thu, 22 Jun 2023 12:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687462062; cv=none; d=google.com; s=arc-20160816; b=iRwiPoXulJnePJNMxegTA4nXYhgFZCFTqpTH6IkvO4RwzWj72JT4Qqn5aNyj83iiQE teb9ehh0sqHOyVeuHXE+XjJGXUwYLI9BpDGLI9xUXHrEnoqi3x5GMoUQm5Y8927Bmh3V uiaP2UtBDbI+9a9NG3uXajUo7FjSMBkr57E0PnC547p4KX9HJtNBxgS0dHj0yaP3x4dz Kpstva/FNW5HGRFamJfDoTDgsuNCgCvmpr1tX7qc/s2Ea8krXh0FqotPT5L/cQcva1ix y4VSsZCTmUyjQOEPyif/5sD+kIf6skU2L753UzuLcCkRDuNeEuOHm9chyyUSRlux84z3 bDZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cuwMLmTxDOxt34Sy1nHQi2wudtCG8J3hXYZulSXSsAg=; b=LYlaBV6egTPbNeyUvRkrhDQVGlNfsND1QzceltP4m4MSdpHhm21AuJ+Lk1UUuhIf5d mvhR+PG/oUOynceBTw4mOkIXwJWeKBfuB7viO+4wFhzJMM7GTCTSIqb/J9PsJiDv/GDD 3TtZ2mH96wG3isRJ0okqfSRn5no5vr2jGmYviKXCczzo99YMrkewhHJfaerX3vG61NSK LdjBSbVXFXj0/ZNqlB08ZkFV9ZD6A+w/Fh6cxW9Tvwofm6efqPrQADjVD+z0oGJ6bGmt H4QB5gOSXlwd6vu8hp2itVfVL/lK55MRTxo9qXeXGFtC6y6bxDoRAGDlmnu9qoIz1nOR 0qBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b="i+Gd4A8/"; 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 t12-20020a170902dccc00b001b23d02a0c7si6838472pll.272.2023.06.22.12.27.30; Thu, 22 Jun 2023 12:27:42 -0700 (PDT) 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=@aruba.it header.s=a1 header.b="i+Gd4A8/"; 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 S230474AbjFVSuC (ORCPT + 99 others); Thu, 22 Jun 2023 14:50:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjFVSuA (ORCPT ); Thu, 22 Jun 2023 14:50:00 -0400 X-Greylist: delayed 61 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 22 Jun 2023 11:49:58 PDT Received: from smtpcmd0642.aruba.it (smtpcmd0642.aruba.it [62.149.156.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92549A2 for ; Thu, 22 Jun 2023 11:49:58 -0700 (PDT) Received: from localhost.localdomain ([146.241.96.150]) by Aruba Outgoing Smtp with ESMTPSA id CPMRqVUdKoNFCCPMRqpqyA; Thu, 22 Jun 2023 20:48:53 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1687459733; bh=zJtpFBlzWk1ZS1ZtblEKyuxmBEYkKm450YWAO4rklz0=; h=From:To:Subject:Date:MIME-Version; b=i+Gd4A8/0DnY9VnzFNPFpf5UTVc9Wa/avbpw3796KnZUToSU76jJmCHks8Nb8w+dA 2avDZYIfwaeRG6+DzbVWkU01xvdbjZvqlcljerCqeRC9dJ+V1bNibu/z8bDUo681r9 UcADbZy+YHGTFS4K/9pyX/v40PrlfgTFU623EHaWEt0Q6Apxxe1od6odsQmZJVm51q VK8V5kLKUTIcSFN9aiaA5YG6MWejvJUsSlEv/49weiDYSlmoZLLOxha9AQCTkcBUjN erACfpn+Ser9+YP2qugSJZtq50qCTliWfK4tLE+ySKBR+IQB2LHQFxWHLQtXKmz1ge WI03A7YrNCYPA== From: Giulio Benetti To: Florian Fainelli Cc: Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Giulio Benetti Subject: [PATCH net-next v2] net: phy: broadcom: drop brcm_phy_setbits() and use phy_set_bits() instead Date: Thu, 22 Jun 2023 20:47:21 +0200 Message-Id: <20230622184721.24368-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfA47KHPQ+3VK5+xnxuA//l8ONlMRqkhsU6gSpgBYA5KtR9yOjLrnq707eHgEyL4be4ghoSu7Peoj+b69HVOA+wh2WFbSjHymKCdL1zISGO5KeEaRbmQe hOR5eBaARQ1OZisyyMbp2E9nz3S4FR4HuEmEgNSHNYt020EAMX/Kh7Gcv4H2t0keD6zi4J2P+e4Wl7pKfTABnRGkoOeSfvTwskROCbbKHlvrhmAqgqE2/bGH XEolM1GACCVx4Uap8nR7J9DDgPGaHqCKzyeDzD/GiKxHgWHbw/PUxw/Am64wCn9KagdAagdTftIf1yKb21uK8v1XJZVuFY7ihoat6YyfBt+Nct0YdSQ5D5Lh ynzkvP9Wq2ByFitm9/XADjzqO25qMqS5UvVmfu7tRuMGy+oVS1jZnQlocEM29Vv2zFa8ubx9Wfo3zdM0mWoqpN8EK7zGEHAtIdOTqbl/Rbe+zmPK26Y5W3oU oa1PjCrUVeNEATO7YYgU0Yo401pLxD/tLbOwx6rDDjJs/AoRvioNvlA9XCaGx0FGLFxyt+3RBo9vsFmJB006eBD6FqnunGRDHsLryN4X/Dxd+hmQYnkZzAsa /j4DAtI3/pR+n7sdnpak9yovA8uPxkjN6rlZU97t1tH299KloEet9r6YPRIJ+Wec6m0= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE,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 Linux provides phy_set_bits() helper so let's drop brcm_phy_setbits() and use phy_set_bits() in its place. Signed-off-by: Giulio Benetti --- V1->V2: * fix code style and add branch net-next to subject as suggested by Simon Horman --- drivers/net/phy/broadcom.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index e81868d1830b..38a6615deaf7 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c @@ -608,17 +608,6 @@ static int bcm54616s_read_status(struct phy_device *phydev) return err; } -static int brcm_phy_setbits(struct phy_device *phydev, int reg, int set) -{ - int val; - - val = phy_read(phydev, reg); - if (val < 0) - return val; - - return phy_write(phydev, reg, val | set); -} - static int brcm_fet_config_init(struct phy_device *phydev) { int reg, err, err2, brcmtest; @@ -689,15 +678,15 @@ static int brcm_fet_config_init(struct phy_device *phydev) goto done; /* Enable auto MDIX */ - err = brcm_phy_setbits(phydev, MII_BRCM_FET_SHDW_MISCCTRL, - MII_BRCM_FET_SHDW_MC_FAME); + err = phy_set_bits(phydev, MII_BRCM_FET_SHDW_MISCCTRL, + MII_BRCM_FET_SHDW_MC_FAME); if (err < 0) goto done; if (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE) { /* Enable auto power down */ - err = brcm_phy_setbits(phydev, MII_BRCM_FET_SHDW_AUXSTAT2, - MII_BRCM_FET_SHDW_AS2_APDE); + err = phy_set_bits(phydev, MII_BRCM_FET_SHDW_AUXSTAT2, + MII_BRCM_FET_SHDW_AS2_APDE); } done: -- 2.34.1