Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2743863rwi; Fri, 21 Oct 2022 07:26:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5hHL9wJpH450+0URGPwIm9Tbtthv55y9NYu5Jlk40olpFRRVDWymkDlTI/FL0iohUZ1dm9 X-Received: by 2002:a63:1e21:0:b0:43a:b17f:cd13 with SMTP id e33-20020a631e21000000b0043ab17fcd13mr16572913pge.553.1666362385459; Fri, 21 Oct 2022 07:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666362385; cv=none; d=google.com; s=arc-20160816; b=tqbomRj2JK+usf6oha3w7rDLDn8gfgJYm8HMCD5E3xd33nVw34L8WvZmDEsWLXnnjF cnJzZv+I+ev6ME4r6/9OUhYBEW6M40a+kteu20ZV/wvM8wKtfbbX6QfZQPSfmpULqMhD P4VRAr3PNnPoRAUsyzfrOaBYhQVL4ESn05QtSty/slN7o7DVkN3yXsnjtKMDHnRTB/zI UjJ/nhiXgA6hA6AT7xRmBnrcCyQJibjZeET0+90/RoyWwSKS2h/m0kMx+I73JVoeDbZd yA/ir+EXFWHbHe9y9JYBXceyFqyU3i+CAkl+xEjupPSL0r4zG/8465TAfCE13s87Vl9A PXPg== 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=vR9tuJLMZg0cMd3jQGnOxd3F/CrROjT+eEFqWGMwYQw=; b=mgcFrXR31kkxt9jqxo20vE9eDWUzIew9nOrjKs4BDaugq2X1S7I/dLbDD9BlDqpxTP Mm9qyFnq79Gicg1vWVvMrXwBL4spo4H15Bjtqg+8FlisxtxYpoOkbIi3YhgWjWm7GMBj Ma3crGGB6FfiD0ZHti6aYBgYD/TEJIflPAC+xjfQyV+9zqRURe72rKnr1cqjIRlSuSC7 jEpi+Zya/lKgBqL0sOLhim3/BcdsfpAa71LodCUuPFci0CuCf1/tVioVF6WiMGt4/3jZ DLhHclLxZdYeCcHp6MyQ1AXG7Ln7nOBM8CUtILtoZC8Z4YUfvXJ440/m86xTUAtForeQ MUhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=AYNxB7zZ; 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 z10-20020a170902708a00b0017123d2abd5si22506993plk.457.2022.10.21.07.26.12; Fri, 21 Oct 2022 07:26:25 -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=AYNxB7zZ; 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 S229685AbiJUOBu (ORCPT + 99 others); Fri, 21 Oct 2022 10:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbiJUOBa (ORCPT ); Fri, 21 Oct 2022 10:01:30 -0400 X-Greylist: delayed 908 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Oct 2022 07:01:25 PDT Received: from vps0.lunn.ch (unknown [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D1A11DEC02; Fri, 21 Oct 2022 07:01:24 -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=vR9tuJLMZg0cMd3jQGnOxd3F/CrROjT+eEFqWGMwYQw=; b=AYNxB7zZPHCxzQl8NpX/bHuNQp 4jTepzz/MKMcCl9REv7QPur/g0V2/IqfhFRT1vsvGBGJ4WwV/Tz57Dbws4L+AISxwKrq+Yv5NShQQ z3GeJ5IT5Sgfa3k8MFrSUQY4LeSvsoubXdHpknc9gTwTFYlvOHzDrmM8mtfaLhqmb6LA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1olsaN-000F41-RP; Fri, 21 Oct 2022 16:01:19 +0200 Date: Fri, 21 Oct 2022 16:01:19 +0200 From: Andrew Lunn To: Raju Lakkaraju Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org, lxu@maxlinear.com, hkallweit1@gmail.com, pabeni@redhat.com, edumazet@google.com, linux@armlinux.org.uk, UNGLinuxDriver@microchip.com, Ian.Saturley@microchip.com Subject: Re: [PATCH net-next] net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips Message-ID: References: <20221021100305.6576-1-Raju.Lakkaraju@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221021100305.6576-1-Raju.Lakkaraju@microchip.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NEUTRAL,SPF_NEUTRAL, URIBL_BLOCKED autolearn=no 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 > +static void gpy_update_mdix(struct phy_device *phydev) > +{ > + int ret; > + > + ret = phy_read(phydev, PHY_CTL1); > + if (ret < 0) { > + phydev_err(phydev, "Error: MDIO register access failed: %d\n", > + ret); > + return; > + } > @@ -413,6 +490,8 @@ static void gpy_update_interface(struct phy_device *phydev) > > if (phydev->speed == SPEED_2500 || phydev->speed == SPEED_1000) > genphy_read_master_slave(phydev); > + > + gpy_update_mdix(phydev); Do you know why gpy_update_interface() is a void function? It is called from gpy_read_status() which does return error codes. And it seems like gpy_read_status() would benefit from returning -EINVAL, etc. Andrew