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=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 9B9F5C433E6 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 54B9F64FEB for ; Thu, 11 Mar 2021 17:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbhCKRfc (ORCPT ); Thu, 11 Mar 2021 12:35:32 -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: netdev@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