From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCB7BC4332E for ; Thu, 11 Mar 2021 17:36:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2E9F64FE5 for ; Thu, 11 Mar 2021 17:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230162AbhCKRfm (ORCPT ); Thu, 11 Mar 2021 12:35:42 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:52346 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbhCKRfL (ORCPT ); Thu, 11 Mar 2021 12:35:11 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lKPDB-00AOKn-6Q; Thu, 11 Mar 2021 18:35:01 +0100 Date: Thu, 11 Mar 2021 18:35:01 +0100 From: Andrew Lunn To: Ilya Lipnitskiy Cc: Sean Wang , Landen Chao , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Matthias Brugger , Philipp Zabel , Russell King , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] net: dsa: mt7530: use core_write wrapper Message-ID: References: <20210310211420.649985-1-ilya.lipnitskiy@gmail.com> <20210310211420.649985-2-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310211420.649985-2-ilya.lipnitskiy@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 10, 2021 at 01:14:19PM -0800, Ilya Lipnitskiy wrote: > When disabling PLL, there is no need to call core_write_mmd_indirect > directly, use the core_write wrapper instead like the rest of the code > in the function does. This change helps with consistency and > readability. > > Signed-off-by: Ilya Lipnitskiy > --- > drivers/net/dsa/mt7530.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index e785f80f966b..b106ea816778 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -445,10 +445,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) > * provide our own core_write_mmd_indirect to complete this > * function. > */ > - core_write_mmd_indirect(priv, > - CORE_GSWPLL_GRP1, > - MDIO_MMD_VEND2, > - 0); > + core_write(priv, CORE_GSWPLL_GRP1, 0); /* Disable PLL, since phy_device has not yet been created * provided for phy_[read,write]_mmd_indirect is called, we * provide our own core_write_mmd_indirect to complete this * function. */ core_write_mmd_indirect(priv, CORE_GSWPLL_GRP1, MDIO_MMD_VEND2, 0); What about the comment? Seems odd to reference core_write_mmd_indirect() when it is not actually called here after your change. Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2418C433E0 for ; Thu, 11 Mar 2021 17:35:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 461BD64F98 for ; Thu, 11 Mar 2021 17:35:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 461BD64F98 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LBrcHrXEfnzSqNzA1Wium51ExsliLNlCCoudHPv2/GQ=; b=J2FBk61iJlcufS9hrQgNXSBPG 3ULc89ckisiRCCR89Llvm20aXKTM6hsuO9QlPYj2xJFWc20s7CLxxWx0GxbYEWZRCFGtvPP7FDipl dqB2AcAQgrVn9aB7EiLY2bFKbQBHag47+6nTZJ0N+wgH2U9k4xZbkfil6l/TTcbZXbDQOjxgG5gxJ ZHr+mWzy/yBqBCIeLKYW6v6LSe4MxrHqHw2rK3VHw/55TC4LXEX03q4wfDjjhdNHqyUXzoGDwEWgJ D1QkIH81HKn/N75kgSifItBbf73g7HWUb+a58ffQOpXESq5oZk4G6RXJpEyGB8llVIpMWvfvcdXp4 GxjW28RRQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKPDZ-009k5j-0G; Thu, 11 Mar 2021 17:35:25 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKPDL-009k2O-1F; Thu, 11 Mar 2021 17:35:12 +0000 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lKPDB-00AOKn-6Q; Thu, 11 Mar 2021 18:35:01 +0100 Date: Thu, 11 Mar 2021 18:35:01 +0100 From: Andrew Lunn To: Ilya Lipnitskiy Cc: Sean Wang , Landen Chao , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Matthias Brugger , Philipp Zabel , Russell King , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] net: dsa: mt7530: use core_write wrapper Message-ID: References: <20210310211420.649985-1-ilya.lipnitskiy@gmail.com> <20210310211420.649985-2-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210310211420.649985-2-ilya.lipnitskiy@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_173511_106041_81E47FAD X-CRM114-Status: GOOD ( 15.60 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Wed, Mar 10, 2021 at 01:14:19PM -0800, Ilya Lipnitskiy wrote: > When disabling PLL, there is no need to call core_write_mmd_indirect > directly, use the core_write wrapper instead like the rest of the code > in the function does. This change helps with consistency and > readability. > > Signed-off-by: Ilya Lipnitskiy > --- > drivers/net/dsa/mt7530.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index e785f80f966b..b106ea816778 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -445,10 +445,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) > * provide our own core_write_mmd_indirect to complete this > * function. > */ > - core_write_mmd_indirect(priv, > - CORE_GSWPLL_GRP1, > - MDIO_MMD_VEND2, > - 0); > + core_write(priv, CORE_GSWPLL_GRP1, 0); /* Disable PLL, since phy_device has not yet been created * provided for phy_[read,write]_mmd_indirect is called, we * provide our own core_write_mmd_indirect to complete this * function. */ core_write_mmd_indirect(priv, CORE_GSWPLL_GRP1, MDIO_MMD_VEND2, 0); What about the comment? Seems odd to reference core_write_mmd_indirect() when it is not actually called here after your change. Andrew _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42286C433DB for ; Thu, 11 Mar 2021 17:36:45 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1E8E64F97 for ; Thu, 11 Mar 2021 17:36:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1E8E64F97 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H+bXSMUknwWD+A2sGFQxpHI0p8q4whbz0GnyPe2M/EU=; b=PTAFUGprFmc2owPPhOo5WT6dO H6srzY1XXKM+sHz31ARwmyowaVMlPTrrIUgYK5SV4nonEj0ogfGRSDt9KDYXziyebt1S4nu0DeuTa 2ib9HpOjno36RMVwC9C+NuGl4CJJUywNxVkawcaW+Bm9DcijfuiB1HdmZxNKEXa3aO+5oK+OCi/qx YOCvnMcnHQe2W45un977LyHuTNkVStpYDs81mMfdzJrfbvobXRAZ+1Qa3WyQ/3S+w2QsFpsSU38Z9 ze7+0GtHLYtzbWVong07PcCDbNJiWZ/zU3GulZV1FVASOSfbsBrvouhBBjUdKKnhfbiQD3dQySkgs HmDklLjtQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKPDR-009k3v-C0; Thu, 11 Mar 2021 17:35:17 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKPDL-009k2O-1F; Thu, 11 Mar 2021 17:35:12 +0000 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lKPDB-00AOKn-6Q; Thu, 11 Mar 2021 18:35:01 +0100 Date: Thu, 11 Mar 2021 18:35:01 +0100 From: Andrew Lunn To: Ilya Lipnitskiy Cc: Sean Wang , Landen Chao , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Matthias Brugger , Philipp Zabel , Russell King , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] net: dsa: mt7530: use core_write wrapper Message-ID: References: <20210310211420.649985-1-ilya.lipnitskiy@gmail.com> <20210310211420.649985-2-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210310211420.649985-2-ilya.lipnitskiy@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_173511_106041_81E47FAD X-CRM114-Status: GOOD ( 15.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 10, 2021 at 01:14:19PM -0800, Ilya Lipnitskiy wrote: > When disabling PLL, there is no need to call core_write_mmd_indirect > directly, use the core_write wrapper instead like the rest of the code > in the function does. This change helps with consistency and > readability. > > Signed-off-by: Ilya Lipnitskiy > --- > drivers/net/dsa/mt7530.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index e785f80f966b..b106ea816778 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -445,10 +445,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) > * provide our own core_write_mmd_indirect to complete this > * function. > */ > - core_write_mmd_indirect(priv, > - CORE_GSWPLL_GRP1, > - MDIO_MMD_VEND2, > - 0); > + core_write(priv, CORE_GSWPLL_GRP1, 0); /* Disable PLL, since phy_device has not yet been created * provided for phy_[read,write]_mmd_indirect is called, we * provide our own core_write_mmd_indirect to complete this * function. */ core_write_mmd_indirect(priv, CORE_GSWPLL_GRP1, MDIO_MMD_VEND2, 0); What about the comment? Seems odd to reference core_write_mmd_indirect() when it is not actually called here after your change. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel