Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2800752pxp; Mon, 14 Mar 2022 05:21:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvQcWeHqHuSj/czPSh97Wryazq5jzsfTQn53gS90qiZblBWxULtvXnfxnDrdH31eN6gmzM X-Received: by 2002:a17:907:6089:b0:6db:a3d7:3fa9 with SMTP id ht9-20020a170907608900b006dba3d73fa9mr13263591ejc.593.1647260468659; Mon, 14 Mar 2022 05:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647260468; cv=none; d=google.com; s=arc-20160816; b=cVyryCvKier8y/DCTtzUXWllRxC1qBB1kD2tFR+ukK2lPuRot9tBpVIMg1H2iiBvF1 aVB3T/VOpzU6dNMSvalertVai97RW+sj3dZHHsbQN8V6xmr9r9t4+PetpsWVvMb8ZOSa ZWAxOpD2OaptLTN+zwEnu/R6qGWWovGB52S9+L+BdovZcA5hdNQZomEefhQsYzyXSoNA glK1PXhF/U4FU4lHBiiNo4Tf/iCOhlTXI/f3GTdXlaJUu4b1tU+DKepqnCyEvsQr3bIH HnAhTslQ5HUiUgGC+l+gp0uZMYnRJ70hcUlMSQdboH+Hh57ZL5Tqq4uLppoTmIDOjeqh 3mZA== 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=IE4hwCJ4VUC9IKmRcRVWFekq0CQCWakqfk3Q5RvuQ8s=; b=O+Do6bYGnOH5K8C6ng4IjtiqONzMagwf1ALAYIyoRXuODxRHG2sCVeWkUZ6C62Rn6y yCf2kFlz+/OFfpVUX1lPHPYuscGtmlg6nLLkS+yVsg42xxNiO8EhKpL5Qp3lmK7Xjovh GsRs3MCkHXkOYAeXTOXX1PEq7EKm2mEK5quA3aPF+8GuN+gigqBBMeQQYqcAlWv0HNEU 7wKBXT7ep0W0guU2el7EWLDojD8E4m+dgfnGKX4I91DNz7/I8TCrL7b2xgueXjU8ssT6 X1Srq79S7+rbxfK5hQNVXTR/9N3gyaAAB+rQRi6GPi5sPTqi+2CSJuSTFMfxGjDrWFtn UhFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fZVPK8Nr; 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 t22-20020a1709060c5600b006cee03e4d20si9305688ejf.761.2022.03.14.05.20.33; Mon, 14 Mar 2022 05:21:08 -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=fZVPK8Nr; 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 S234650AbiCMOpU (ORCPT + 99 others); Sun, 13 Mar 2022 10:45:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbiCMOpT (ORCPT ); Sun, 13 Mar 2022 10:45:19 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B04853ED0F; Sun, 13 Mar 2022 07:44:10 -0700 (PDT) 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=IE4hwCJ4VUC9IKmRcRVWFekq0CQCWakqfk3Q5RvuQ8s=; b=fZVPK8NrD6HPhKeo+T2dQ3hlef c4kR+fMh1EJDEMi0MnCezl3NamqVIXFHhv/FGtw+ZbIr91HpV/sXTDblDlhwisrn8lBqzcF28oSDP c71NvmrZ59TtUMFM9ZXJ7895W3ojVZG126pgXnl56MTlj0FI9JpW77AeRk/+1KrfAUVA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nTPRw-00Ad7Q-AR; Sun, 13 Mar 2022 15:44:00 +0100 Date: Sun, 13 Mar 2022 15:44:00 +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 3/3] et: mdio: mscc-miim: add lan966x internal phy reset support Message-ID: References: <20220313002153.11280-1-michael@walle.cc> <20220313002153.11280-4-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220313002153.11280-4-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 > /* When high resolution timers aren't built-in: we can't use usleep_range() as > @@ -157,27 +166,29 @@ static int mscc_miim_write(struct mii_bus *bus, int mii_id, > 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; > + unsigned int offset, mask; > int ret; > > - if (miim->phy_regs) { > - ret = regmap_write(miim->phy_regs, offset, 0); > - if (ret < 0) { > - WARN_ONCE(1, "mscc reset set error %d\n", ret); > - return ret; > - } > + if (!miim->phy_regs || !miim->info) > + return 0; I would put the check for miim->info in the probe. Not checking the return value from *_get_match_data() is one of the things the bots reports and we receive patches for. You have the check, but it is hidden away, and i doubt the bot nor the bot handlers are clever enough to find it. Andrew