Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1905817pxp; Sun, 13 Mar 2022 03:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwhJ534lbgiX24v2qMlwU1UC8YzS0m6USnkmlVfDpDMFe1WdgR6iBWPv8lDSJOEn5+B9+g X-Received: by 2002:a17:902:bb92:b0:153:4eae:c77e with SMTP id m18-20020a170902bb9200b001534eaec77emr4508785pls.93.1647168638404; Sun, 13 Mar 2022 03:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647168638; cv=none; d=google.com; s=arc-20160816; b=Z9FGBR3SeLzGJ0r9j/jAcTDemfQNg0Mh5BuZaZtwK4F1WwzZgih0JWIte7D5a51cO8 XlrwhQx1ymCx/YHpsK8FVbk+Lf4Wgee3D0BKrfDpgFF3tkU8kaGO7/ki+tc5A0Oo4ShA deb/PC+E0dNIP/J8cGH6wu87tgMUEeVaWY2fnPFd7RPALbcasDUAiGbWZ6GbItfMwyS3 fV/SZPro26sTG9sBaHyx4vdZPZGuyG2hMLPLKQAJWJEVuDdgd2bhMeWTLkU6ZMEOqXLp 9QTsMml9iw5EVIZxUGj1GT6xMCUznysd/6ArLP7qteP99UVSNLNrUX47xUorfnifc6i8 WP+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8YUvNG06bdboNHMBPrOG/45tQcIFayxAcvabE0tp0us=; b=eGxPDQBVy3bkFNB4iPxvJiOzO/JeqxU1pppNZaieLMGi9NKCC0zmyo8StQiVjiNZdN i1xu/qG5QgWQZzeW5/7OMid1ZCtCWieNR4hQD8xR+KS2y1DjVMqgDg5R9N7bv6duUKqQ NuwM/NqbIcjN28tHUqv/SIe+Hp6fhqp1cumzgTjIRPi8BvPV+GR9CbnDZSwjppZkI4KW Ew65MqFoGa2tDcXk/Y8eqlQHYulN+b8g0cU3fGN7y7w8AQMv750M04JCd3iJJeF2Z9Qd ZZJ5XMVmvm6aBu52KduJkCY5QSSor0+bjvwgszSo7HvoNZp5DJ4piEH5ywXF4Px1DZwo Nbhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=4wjB5bN6; 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 js5-20020a17090b148500b001bd14e01fa7si12391874pjb.149.2022.03.13.03.50.27; Sun, 13 Mar 2022 03:50:38 -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=@lunn.ch header.s=20171124 header.b=4wjB5bN6; 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 S231913AbiCMAxO (ORCPT + 99 others); Sat, 12 Mar 2022 19:53:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231848AbiCMAxN (ORCPT ); Sat, 12 Mar 2022 19:53:13 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7627F79394; Sat, 12 Mar 2022 16:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=8YUvNG06bdboNHMBPrOG/45tQcIFayxAcvabE0tp0us=; b=4wjB5bN6N1QJzm9WC7CrWBWPvt JgqRWW0XBaQHdz38aqrT24KRFLPAcxunhOyT2Aek9XfB4KcJ/qPES17lwGOq21vbL+BAZnW9N19iP 2hgdSb6dRSY8q80vwNwA2ZoTwVf+p92bzQKb0CNo84sXVmBJH6kHZVg/bbcBBvBuNgg8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nTCSi-00AXeO-U2; Sun, 13 Mar 2022 01:51:56 +0100 Date: Sun, 13 Mar 2022 01:51:56 +0100 From: Andrew Lunn To: Michael Walle Cc: "David S . Miller" , Jakub Kicinski , Rob Herring , Krzysztof Kozlowski , Heiner Kallweit , Russell King , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/3] net: mdio: mscc-miim: replace magic numbers for the bus reset Message-ID: References: <20220313002153.11280-1-michael@walle.cc> <20220313002153.11280-3-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220313002153.11280-3-michael@walle.cc> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 > diff --git a/drivers/net/mdio/mdio-mscc-miim.c b/drivers/net/mdio/mdio-mscc-miim.c > index 64fb76c1e395..7773d5019e66 100644 > --- a/drivers/net/mdio/mdio-mscc-miim.c > +++ b/drivers/net/mdio/mdio-mscc-miim.c > @@ -158,18 +158,18 @@ static int mscc_miim_reset(struct mii_bus *bus) > { > struct mscc_miim_dev *miim = bus->priv; > int offset = miim->phy_reset_offset; > + int mask = PHY_CFG_PHY_ENA | PHY_CFG_PHY_COMMON_RESET | > + PHY_CFG_PHY_RESET; > - ret = regmap_write(miim->phy_regs, > - MSCC_PHY_REG_PHY_CFG + offset, 0x1ff); > + ret = regmap_write(miim->phy_regs, offset, mask); Is mask the correct name? It is not being used in the typical way for a mask. Andrew