Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3798889rdh; Tue, 28 Nov 2023 04:22:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5zWbZRlrlgeAQPNcdn94wfhG59CUnrnNxNyi3R1uc3SpFCR9K/hFAzMNjj4sI4Ym7p1Dl X-Received: by 2002:a17:90b:30cb:b0:27d:3f0c:f087 with SMTP id hi11-20020a17090b30cb00b0027d3f0cf087mr15387757pjb.25.1701174159182; Tue, 28 Nov 2023 04:22:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701174159; cv=none; d=google.com; s=arc-20160816; b=wl3zIyNR/CseVFToQXSHh81Zok133qLrXJgNCgfFJjdfGKXLn/gA5qljI2sJJK0+++ Jij/yB6jcb9SHZ4slKjf3YNQz16Q0wv2fkSATd1zgKHiJjSNlye5ycbcSZkxqfcBR1wi gHfSKVkowwA9pJUYBXooFrQsnUHO8ywosM94W37/c+1ebJ39adspxMM//YIddqOb4b02 SIf4OG/gWb/xBMpRzd8pIg1gxmlVpRL+23XJYGrpMGEeoRpX5V9/zTnU6kFFnrO+qnlT W8yhqaF9kx/49KMzAmL60er5BWE+OifzBIgmWGSfP8D3dsIPHAQeDaEbGmdzWXTBMDJ6 gq4g== 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=2AMt7jp7zrGQ1Hr3T3kEt4MJP2MZsgNYKWbkaVlt5lk=; fh=4eNKZLwTAowp5FvH8JZQ/aWEFbs842jSQIl9TCPe04Q=; b=ZiygFq0hZc6i1I1QDpnxownIWYmkZYK9qo27qyP2f/Mx9Ncv6Ro/CHDW0pIXqwY2Ok A8ggC6zgy4gzWoU/NUoHqTsw8tqokxq2n2Kbw6RTkESPYGSyVO8mllQLbskp8iymuoZx SNaPpLFzoXmMHxt8HNhYbD3Z/tlUZzpRs8u+b8eEgtFJVRp95Py52PRDB68UI/pTmWeL ZPzYUeWuh1rXWITxjLDdRIlvX3pkVMX9GOnp4dJDWezDe5fX1vPokjJ0tJlguyS6DRtB 0LaTXQFcNTTQpSYptiBMYZXVwu0GK8rlW2XObBFMYeWPGwEAb6lvj5sVaGUT+tx7MXvU FqAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=bJ65ZEwG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j2-20020a170902da8200b001cf579f758asi12550549plx.437.2023.11.28.04.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 04:22:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=bJ65ZEwG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 67D28806AFFE; Tue, 28 Nov 2023 04:22:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344088AbjK1MWW (ORCPT + 99 others); Tue, 28 Nov 2023 07:22:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234668AbjK1MWV (ORCPT ); Tue, 28 Nov 2023 07:22:21 -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 34A0D95; Tue, 28 Nov 2023 04:22:27 -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=2AMt7jp7zrGQ1Hr3T3kEt4MJP2MZsgNYKWbkaVlt5lk=; b=bJ65ZEwGSH2/MC2OoHkcrz4GcS d+gmN9w5J4sSugxSmgc44OC9HhFr5Gp145bwfaOcSUcRMdonH1ZRdHT2it78kzD4P5BTf2tm7g9BY 9e5Q5zqZHhZDb6kwhBJf4X22sCAOM4qNehy+hvPCYuA8oKQR5St65HLa6xr+el5C9w5Kyx5jVii5d 5lEMPCxbd9wv6rz3A95i1PUbfBw+wDDpQTaaTsCFHqPF7TNQIZedX7f1SfAOA4Uti+qPV+px7CddW 6O9FEWcVE7w+GOiqfArHIdSwncoehFRgPuI0rqhC263cnhEfI5KEPT6JmLxZ/wBEs5AcLIKssDQxN N7yFTKTQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:47282) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r7x6V-0007HZ-2S; Tue, 28 Nov 2023 12:22:15 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r7x6U-0002wn-Ib; Tue, 28 Nov 2023 12:22:14 +0000 Date: Tue, 28 Nov 2023 12:22:14 +0000 From: "Russell King (Oracle)" To: Christian Marangi Cc: Andrew Lunn , Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , David Epping , Harini Katakam , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH v2 3/4] net: phy: restructure __phy_write/read_mmd to helper and phydev user Message-ID: References: <20231126235141.17996-1-ansuelsmth@gmail.com> <20231126235141.17996-3-ansuelsmth@gmail.com> <6565d8d6.5d0a0220.5f8f1.b9d7@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6565d8d6.5d0a0220.5f8f1.b9d7@mx.google.com> 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 28 Nov 2023 04:22:36 -0800 (PST) On Tue, Nov 28, 2023 at 01:11:00PM +0100, Christian Marangi wrote: > On Tue, Nov 28, 2023 at 01:46:10AM +0100, Andrew Lunn wrote: > > On Mon, Nov 27, 2023 at 12:51:40AM +0100, Christian Marangi wrote: > > > Restructure phy_write_mmd and phy_read_mmd to implement generic helper > > > for direct mdiobus access for mmd and use these helper for phydev user. > > > > > > This is needed in preparation of PHY package API that requires generic > > > access to the mdiobus and are deatched from phydev struct but instead > > > access them based on PHY package base_addr and offsets. > > > > Why is this all going into the header file? > > > > Was following the pattern done by phy_package_read/write. > > Considering those API are not single function call... I wonder if those > should be moved in phy_core.c instead of static inline them in the > header. phy_package_{read,write} are simple affairs - one test and a call to a function. That makes them fairly small. The proposed new functions aren't small, which means that we get a load of code each time they're used. Therefore, it's better that they're out of line. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!