From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6607FC74A5B for ; Tue, 21 Mar 2023 03:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8LNdFoJzLkau8KOXNsGAkp8XPLDtdYvZ53sAMTu+SWY=; b=iJpvs6x8bD20Oo xJSglMG9IluENDp5w3jLS4DiMnBOwiNa+2hCx1+q6wKNAWMJfk7Ng8RYbTTBVCwd/xRdIpS9jpujC v2bI8T7XxPeeq7TckhVvnQYzLQGLNqj+++wcj89hgKYw+lUbIWIugLKd+w39ao9NaMmNBGX/B0VkD /3r/09n/4QhihGhqTvuO37YGg69qhG348OktPHWlij6mQ1UfntHvtx/RWydbw7al5T92bT+QwtPvt 72lCkMFka34qUegXasL33kj5k4m56lK4KAb9Jkr1Wyy/Xte5kEoB8qGoVBaL6yfMloI83mNDdjkw4 yuBwm7WjF0NlfEf6CncQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peSsy-00B7TW-1U; Tue, 21 Mar 2023 03:42:08 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peSsu-00B7So-27 for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2023 03:42:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 6AD44CE173E; Tue, 21 Mar 2023 03:41:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17888C433EF; Tue, 21 Mar 2023 03:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679370116; bh=Jk2T8KzAk6AYQ1kjo+O7hUQbaKhmKLsFTuvlYvwxK/A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oLf3l/0yU8YpuM7jfKUSyIKeoRoUdovOG9TYbeB30Wm8DCFIhnaL6MV24hkWZyeUi 6zntvyKAunOQIffo2oeilPDVtH4aJAV0jofS/FBZkNcRE+rIbye/YZnJ1A3rnj/G9N rIvBgzbrwLPBn3WT5EBKLRtM/fCUT4srAorE1TX+XroTG2dxAn3sjDnSNVzrDn63Z5 4U0YEr+xP21vy0nzcmFci9MHCHCEsBP903MTQ5c275B9i8ZSY9Kn6uHYE4A5RvCkBX CL+b8t1GpWaKooO9pIVDpcC21GnX3+ZTBEVLVQcqcQUApDiAeDVzcATDiDvffwRsiR wQjxtHPocjnNg== Date: Mon, 20 Mar 2023 20:41:53 -0700 From: Jakub Kicinski To: Andrew Halaney Cc: linux-kernel@vger.kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, bhupesh.sharma@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com, linux@armlinux.org.uk, veekhee@apple.com, tee.min.tan@linux.intel.com, mohammad.athari.ismail@intel.com, jonathanh@nvidia.com, ruppala@nvidia.com, bmasney@redhat.com, andrey.konovalov@linaro.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ncai@quicinc.com, jsuraj@qti.qualcomm.com, hisunil@quicinc.com, echanude@redhat.com Subject: Re: [PATCH net-next v2 09/12] net: stmmac: Add EMAC3 variant of dwmac4 Message-ID: <20230320204153.21736840@kernel.org> In-Reply-To: <20230320221617.236323-10-ahalaney@redhat.com> References: <20230320221617.236323-1-ahalaney@redhat.com> <20230320221617.236323-10-ahalaney@redhat.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_204204_898024_FEC80C87 X-CRM114-Status: GOOD ( 11.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 20 Mar 2023 17:16:14 -0500 Andrew Halaney wrote: > The next approach that was checked was to have a function pointer > embedded inside a structure that does the appropriate conversion based > on the variant that's in use. However, some of the function definitions > are like the following: > > void emac3_set_rx_ring_len(void __iomem *ioaddr, u32 len, u32 chan) I checked a couple of callbacks and they seem to all be called with priv->iomem as an arg, so there is no strong reason to pass iomem instead of priv / hw. Or at least not to pass both.. I think that's a better approach than adding the wrappers :( Are you familiar with coccinelle / spatch? It's often better than just regexps for refactoring, maybe it can help? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel