Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1149262rwl; Fri, 7 Apr 2023 10:38:53 -0700 (PDT) X-Google-Smtp-Source: AKy350avNBCqeAnSwFz/5qGjJtgKUG9g/1oOHM+L3gVJWQ7v3TMvrqBMBVe2UteQw8hRMHH6xVJn X-Received: by 2002:aa7:980a:0:b0:627:fc3b:4cb4 with SMTP id e10-20020aa7980a000000b00627fc3b4cb4mr3105788pfl.19.1680889132943; Fri, 07 Apr 2023 10:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680889132; cv=none; d=google.com; s=arc-20160816; b=pl4Ho2zsLvYWIQVXEBNNgx14hmINtg97df2RNTeCIzEv2BTvkfPNCpmdUT1qFuGyC5 PZzGScV/ezoDIFVcri1LlOVYz+3ihvEt3i8RcALkwhYyt3KrmauZYFLxVosKQ2eeVpAb bxn+ltdkIRL5LCp5xiUrbvuSd3bSbNtBEUdmitQBpwcK8tD5uCUf8rsNQ7V1VhxivqcM +OE+IXHeYPBMBSyjbQ1KPlh/lYLqrgQucJ81Jp/tG88vkDqjvMvKWSZ0dlXb46FThwOI n2XkBFzAbEYhBenvDwLinJfVVaXDYuKXBkWakxl4vJTDsS7Q4RxMacV8N37EVcrZlhQN r+VA== 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=VgSBn4v63sH/hPEOpjuOfluIneyO592ey/flc3R1Lws=; b=y6n0HXOBQUUwGxbZizcjgtr4vTS5GxRyrW4tU46wjwq4X6QnXW7rIms1Izk9ra3GhA RaKVBqEdK2ad/m6oYzXB/E0GRpr28PPM8TLmPO5rCNm6IWu5Q2alqVwjWjO/WgBVzJs2 QHNQHVBca/mLt+iEmszkj+hikab49HFid43902TUbGwN1Q4t/I8aUCkS15o3V/+4L+CC wh+3LFK1kV2chafOwhX78WHPZQJg7SBmbRzpWs/zrCaWqSXujxH5PKRMnCYZIihid5oO 5fjCSAnvdNEK6lSiXLUCTplswanBcpqvgTJeWxRTfltDVvG7YkkUGy3alaLPnagoAvt0 yamA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZVOQpywM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q74-20020a632a4d000000b00513ac21a77bsi2761899pgq.880.2023.04.07.10.38.40; Fri, 07 Apr 2023 10:38:52 -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=@redhat.com header.s=mimecast20190719 header.b=ZVOQpywM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229458AbjDGRfm (ORCPT + 99 others); Fri, 7 Apr 2023 13:35:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjDGRfk (ORCPT ); Fri, 7 Apr 2023 13:35:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3975B74C for ; Fri, 7 Apr 2023 10:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680888900; 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=ZVOQpywM/ihvbcFJMqZ6oqfoZgQPs3K/v1FXm38XDIf83KE8JgM5jwYEFDyItUh46nvCCM B2FJqY3os5gp1Q82tT6puKwEn7Z9dGqu7sXQXYI++sPIJMfsRMmK1VoFdwfNIMolyIg2dV 6letRGpm0babh+lpx9neiBqmklf+/SY= Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-244-1DaUEofAOhiunlruhUHXiw-1; Fri, 07 Apr 2023 13:34:58 -0400 X-MC-Unique: 1DaUEofAOhiunlruhUHXiw-1 Received: by mail-oo1-f71.google.com with SMTP id k3-20020a4a9483000000b00541aa021802so376086ooi.7 for ; Fri, 07 Apr 2023 10:34:58 -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=TVb2Xrm9xYxImMLJ8U9qr8BmE/VADI/yE/XgmXZ5xbnvudEbSZUB3DvFmWFNTsJ6dv p3aI0jqxyz2ODeP7HnkiXzrvF8o8aQVXGsB6Ay42rtiLo9fLCniT6sgZpL8Poyo+4g3j ouvireYMOkt2UR4b7/IaWgfby1kuyLxJgwnSLR5LrUuoc25SbPVB7H6WQISYzG6UBoI7 Od68KPTdj47o5EKT58BLvkPhSBzfNOzTt8LBACauNC8cgpqMl6809d3V8t4gCo/hNqTp EPTLD9+43nCzzCTnJzUjuv26rc05UKOtVsfjlw/ErQwcvqk4mmyYayowa5OPx7L5S5Ao 5iow== X-Gm-Message-State: AAQBX9dPwL3ZqjsjXGHyaoKXtfGVTwRRBKkMytNXQ+WBXYGi/v3oGf8L Jn7riba9KyE+0DTxejJvXZWoApGfL62FPT7IkUdoG9dtx8hUawr/56kDdZq390PaXw1dXGlG7Tk Whw+KVKNpwkS3FiN9rZcbx558hDqzHHcHc8g= X-Received: by 2002:a05:6871:828:b0:17a:ce6b:726 with SMTP id q40-20020a056871082800b0017ace6b0726mr1927750oap.57.1680888897164; Fri, 07 Apr 2023 10:34:57 -0700 (PDT) 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 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