Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp336436rdb; Tue, 5 Dec 2023 06:54:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCC/aD/duqpkC3lXtI5OrAdvPgEJ6cqOMdbjeyXP7sxJaP+Wlr3xk5iaDmtoVy419hYPbA X-Received: by 2002:a17:902:bf47:b0:1d0:c2ef:a6f7 with SMTP id u7-20020a170902bf4700b001d0c2efa6f7mr1080637pls.73.1701788065196; Tue, 05 Dec 2023 06:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701788065; cv=none; d=google.com; s=arc-20160816; b=gIDuyy2eny2yCXBHXC35XseKdDL+jMgXlUJa1YDJ4YIwet9X4DDh7m5TQlDfvadhYY a8mhoYBI1vkrdVbC6L3SLGG6FhCwm6vLwIfZ53oTHA+jOcXgKsgcDADvUckn2BWLPdkJ /O4teocT19DtO/Uq013K6a6C/HYqcNNkxGABt0ECe8VQx0mf4Id1pQ91+blg4xu2EkOl oLNkmLrf0+ubdTN11BQDEvc2yDnBzAK6ED66HF3cbSonfsLKoCEI8V6sC82If5JPq8fQ T8V9OTo80hBeQkmOggcndjL5fLMwa/RsuxbkLq91sTr33cekVUv+oT4aSLdBzC9Bqb0I UyFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aS+6Mc/VT/2j+J5fJogDFiX1PU1iHoMxy86IBJ3C6/I=; fh=0CjR/P59gkS3RoA1MzYD3TAB1GMUolY2z17tQE+puF0=; b=dRMHFzvr5q0cWv4J/nPz/UY9G6bD2ruAJ9kmEe+xvtLCuO1vJo6hfgO239McyMHH4J dYsdO+ouaohhqwH7DM5ela/o8ubiLp69hmPmmOktHJ0DP1VJ0SzMeQa6woejOdOLkn8+ i/XMqEhYCUY39+gQxwvCwjarn7bPlSpLzryvrFD9T2PssB/mvlpNorWXrptkOYbEpUCn tf9kpZyT240xlowYLImY6xLqlGdg/OEp2HmglvZ/X6X9hdiW5dHcSRviEtUEZSdDDqkQ QQFjjBMYvRoIRzjx7N6+6iWRkjmzNzo7fI41erk3BJbKgANkoQOxiL3DqCg+9DYDR0AH 5rkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=mYWzI8iM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h8-20020a170902f54800b001c9c967e77esi4613087plf.207.2023.12.05.06.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:54:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=mYWzI8iM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 82E49804BDD9; Tue, 5 Dec 2023 06:54:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345742AbjLEOyJ (ORCPT + 99 others); Tue, 5 Dec 2023 09:54:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345682AbjLEOyI (ORCPT ); Tue, 5 Dec 2023 09:54:08 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0310C9; Tue, 5 Dec 2023 06:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aS+6Mc/VT/2j+J5fJogDFiX1PU1iHoMxy86IBJ3C6/I=; b=mYWzI8iMiL08atPYNN06Cc+NGc NBj8ZaHxjOFkpVKIVt30yreNEm9kMF+z6KJ7s7Ms90yMM46UOFMHe2l+UkxkYWaOzEafyImYqfuKw 5dpqyLcXTwLCMT4fC7D7W5K0PrZwCEIb9XTwDloKNDguedQYNcScu+cT1Ur9afBDSEX/iJ2+cZrcu Nxo0rBovQy5a7RquutTs6v4rpQs1A+DDHLK9jPsn9qQfoKOGDilT9MtfaKxktjCP+FOj+TkgIPiJQ QigCHlF+jUn8rmPFaJvVzCuDQPu9gQxFdtoLoc6eHBnJBvSX379/NWymBSj/aUla5GbRXZCP5OEDt xO7ll1kQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56866) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rAWoB-0006ux-1C; Tue, 05 Dec 2023 14:53:59 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rAWoC-0001nk-Fm; Tue, 05 Dec 2023 14:54:00 +0000 Date: Tue, 5 Dec 2023 14:54:00 +0000 From: "Russell King (Oracle)" To: Serge Semin Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Chevallier , Tomer Maimon , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 06/16] net: pcs: xpcs: Avoid creating dummy XPCS MDIO device Message-ID: References: <20231205103559.9605-1-fancer.lancer@gmail.com> <20231205103559.9605-7-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 06:54:22 -0800 (PST) On Tue, Dec 05, 2023 at 01:46:44PM +0000, Russell King (Oracle) wrote: > For your use case, it would be: > > mdiodev = bus->mdio_map[addr]; By the way, this should be: mdiodev = mdiobus_find_device(bus, addr); if (!mdiodev) return ERR_PTR(-ENODEV); to avoid a layering violation. At some point, we should implement mdiobus_get_mdiodev() which also deals with the refcount. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!