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 4C804C77B61 for ; Fri, 7 Apr 2023 17:35:55 +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:In-Reply-To:MIME-Version:References: 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=CaFRiWdcxcnI0LL+2RzyxsGRKFWVPJePz4MYO72pXAc=; b=vuzUSFTQxsFMJu REQ3oLOpVWxzevcAaBev7AL36us/+k1KbRJJJJ9cAJwbCahva2nO5cokYVvu1KxAJaCXiIYd6vLJO iPedjLQqnjGSboiCG4SGnhRPAszThNU2Sg7worGGl8SdAXWNc80QrEbUdBRkwTVqRTN+Z9oYEZQJq ECCMUaXdtrgsJRbDp6WlEkfYiuIXyp9XlQgvDYXuqKY++oZnqekkyIADDyzzODXy2QO/vXRGt+HtD VQChY5dO8J+ArcUhXhozKKu7ARevnbMn6yGTHkqInAcbubDEOaTiJm9MCXHwxXQRjje3MkrPhRL/i I36JNIWFeoS0KRNBW94w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkpzM-00AooO-3C; Fri, 07 Apr 2023 17:35:05 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkpzK-00Aon8-0J for linux-arm-kernel@lists.infradead.org; Fri, 07 Apr 2023 17:35:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680888899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VgSBn4v63sH/hPEOpjuOfluIneyO592ey/flc3R1Lws=; b=WqF/oCk6brDf9/ddFHn7OBva1Il+Q+gpY+YtszZbRf0UTgrBOhZ+mJfZxYF4PVv8IwDbft OnV6UGrAjwjGEMcfiF0pZeHoKV9Fp25vzmOcIc27IWtM7QVL2ZnpJiRBOngZLqB3xyEyRz 8rIYSTNcFvkZh8XvC3DfCdPVpGHs07g= Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-5-H1AWgxDfMPiPbFjHX28_Ow-1; Fri, 07 Apr 2023 13:34:57 -0400 X-MC-Unique: H1AWgxDfMPiPbFjHX28_Ow-1 Received: by mail-oo1-f70.google.com with SMTP id bw6-20020a056820020600b00541854cb12cso2055251oob.4 for ; Fri, 07 Apr 2023 10:34:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680888897; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VgSBn4v63sH/hPEOpjuOfluIneyO592ey/flc3R1Lws=; b=GyelZj3mFrAXVe5ipRNvWx15/jFTudhKZe7j13HbMMfNxh183iBktls76mopWBOlLY dXD5lLhu9GJlNwD0XFdnupT8Ed8GXseJoK5DRzSz99B4UlVF4KncJ01hXiLaKEB0xEax L7TMe2Zm53Ip9Cu7uFBywOqaCTf6tOym2ydXdALfpp80NmH76Ygqm06Vv//fphuZWjBU NP3EA56Pf6qOheqQ4iIECwdBYpXIYiQXN6kVWX70kuokN8hSZJPExITJilp7tJY1HQ6/ 57RjENjLxBxBezPsZKDKV3+jbBn5aa/oUmBSk0NuO9AHerq1ANguJMLxCjxHnfmijhO8 /hkg== X-Gm-Message-State: AAQBX9dViJihKwtuEyAyvEvUmUczUubvPukLuz67+09C6I7fN0kT30TV rO2sl5j25tnpcFSms16q+lYyQSJ/8dS9OBjoI4smFwsqCAfqcj/VrsRzcfvSLGMg/KDzBIW/hlX 6QEW4D9h0rDxiOo+JtkgxzOQvE1tSKx3mBpg= X-Received: by 2002:a05:6871:828:b0:17a:ce6b:726 with SMTP id q40-20020a056871082800b0017ace6b0726mr1927778oap.57.1680888897192; Fri, 07 Apr 2023 10:34:57 -0700 (PDT) X-Google-Smtp-Source: AKy350YXsTSTagUzg6KkiTKxiPA0gPNgmGx86bP9YtG1X657Q3uhpK3CFF1WVzwPqGtc/1IMJf5fWg== X-Received: by 2002:a05:6871:828:b0:17a:ce6b:726 with SMTP id q40-20020a056871082800b0017ace6b0726mr1927741oap.57.1680888896927; Fri, 07 Apr 2023 10:34:56 -0700 (PDT) Received: from halaney-x13s (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id y1-20020a056870458100b001777244e3f9sm1822096oao.8.2023.04.07.10.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 10:34:56 -0700 (PDT) Date: Fri, 7 Apr 2023 12:34:53 -0500 From: Andrew Halaney To: Simon Horman Cc: linux-kernel@vger.kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, bhupesh.sharma@linaro.org, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, mturquette@baylibre.com, 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-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 v3 08/12] net: stmmac: Pass stmmac_priv in some callbacks Message-ID: <20230407173453.hsfhbr66254z57ym@halaney-x13s> References: <20230331214549.756660-1-ahalaney@redhat.com> <20230331214549.756660-9-ahalaney@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230407_103502_330330_C72C3B7B X-CRM114-Status: GOOD ( 19.19 ) 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 Sat, Apr 01, 2023 at 05:06:21PM +0200, Simon Horman wrote: > On Fri, Mar 31, 2023 at 04:45:45PM -0500, Andrew Halaney wrote: > > Passing stmmac_priv to some of the callbacks allows hwif implementations > > to grab some data that platforms can customize. Adjust the callbacks > > accordingly in preparation of such a platform customization. > > > > Signed-off-by: Andrew Halaney > > ... > > > #define stmmac_reset(__priv, __args...) \ > > @@ -223,59 +240,59 @@ struct stmmac_dma_ops { > > #define stmmac_dma_init(__priv, __args...) \ > > stmmac_do_void_callback(__priv, dma, init, __args) > > #define stmmac_init_chan(__priv, __args...) \ > > - stmmac_do_void_callback(__priv, dma, init_chan, __args) > > + stmmac_do_void_callback(__priv, dma, init_chan, __priv, __args) > > Hi Andrew, > > Rather than maintaining these macros can we just get rid of them? > I'd be surprised if things aren't nicer with functions in their place [1]. > > f.e., we now have (__priv, ..., __priv, ...) due to a generalisation > that seems to take a lot more than it gives. > > [1] https://lore.kernel.org/linux-arm-kernel/ZBst1SzcIS4j+t46@corigine.com/ > Thanks for the pointer. I think that makes sense, I'll take that approach for these functions (and maybe in a follow-up series I'll tackle all of them just because the lack of consistency will eat me up). Sorry for the delay, had some issues around the house that became urgent. Thanks, Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel