public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Andrew Halaney <ahalaney@redhat•com>
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
Subject: Re: [PATCH net-next 08/11] net: stmmac: Add EMAC3 variant of dwmac4
Date: Thu, 16 Mar 2023 11:52:34 -0700	[thread overview]
Message-ID: <20230316115234.393bca5d@kernel.org> (raw)
In-Reply-To: <20230316183609.a3ymuku2cmhpyrpc@halaney-x13s>

On Thu, 16 Mar 2023 13:36:09 -0500 Andrew Halaney wrote:
> static void emac3_config_cbs(struct mac_device_info *hw, u32 send_slope,
> 				    u32 idle_slope, u32 high_credit,
> 				    u32 low_credit, u32 queue)
> 
> I agree, that's quite gnarly to read. the emac3_config_cbs is the
> callback, so it's already at 6 arguments, so there's nothing I can
> trim there. I could create some struct for readability, populate that,
> then call the do_config_cbs() func with it from emac3_config_cbs.
> Is that the sort of thing you want to see?

Yes, a structure is much better, because it can be initialized member
by member,

struct bla my_bla = { .this = 1, .that = 2, .and = 3, another = 4, };

That's much easier to read. A poor man's version of Python's keyword
arguments, if you will.

  reply	other threads:[~2023-03-16 18:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 16:56 [PATCH net-next 00/11] Add EMAC3 support for sa8540p-ride Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 01/11] dt-bindings: net: snps,dwmac: Update interrupt-names Andrew Halaney
2023-03-16  7:13   ` Krzysztof Kozlowski
2023-03-16 16:15     ` Andrew Halaney
2023-03-16 19:20       ` Krzysztof Kozlowski
2023-03-13 16:56 ` [PATCH net-next 02/11] dt-bindings: net: snps,dwmac: Add Qualcomm Ethernet ETHQOS compatibles Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 03/11] dt-bindings: net: qcom,ethqos: Convert bindings to yaml Andrew Halaney
2023-03-16  7:18   ` Krzysztof Kozlowski
2023-03-13 16:56 ` [PATCH net-next 04/11] dt-bindings: net: qcom,ethqos: Add Qualcomm sc8280xp compatibles Andrew Halaney
2023-03-16  7:19   ` Krzysztof Kozlowski
2023-03-13 16:56 ` [PATCH net-next 05/11] clk: qcom: gcc-sc8280xp: Add EMAC GDSCs Andrew Halaney
2023-03-13 22:57   ` Stephen Boyd
2023-03-14 13:53     ` Andrew Halaney
2023-03-14 15:13   ` Konrad Dybcio
2023-03-14 16:08     ` Andrew Halaney
2023-03-16 22:21       ` Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 06/11] arm64: dts: qcom: sc8280xp: Add ethernet nodes Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 07/11] arm64: dts: qcom: sa8540p-ride: " Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 08/11] net: stmmac: Add EMAC3 variant of dwmac4 Andrew Halaney
2023-03-14  0:39   ` Jakub Kicinski
2023-03-16 18:36     ` Andrew Halaney
2023-03-16 18:52       ` Jakub Kicinski [this message]
2023-03-16 23:01         ` Russell King (Oracle)
2023-03-16 23:18           ` Jakub Kicinski
2023-03-14  0:59   ` Andrew Lunn
2023-03-13 16:56 ` [PATCH net-next 09/11] net: ethernet: stmmac: dwmac-qcom-ethqos: Respect phy-mode and TX delay Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 10/11] net: ethernet: stmmac: dwmac-qcom-ethqos: Use loopback_en for all speeds Andrew Halaney
2023-03-13 16:56 ` [PATCH net-next 11/11] net: stmmac: dwmac-qcom-ethqos: Add EMAC3 support Andrew Halaney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230316115234.393bca5d@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=agross@kernel$(echo .)org \
    --cc=ahalaney@redhat$(echo .)com \
    --cc=alexandre.torgue@foss$(echo .)st.com \
    --cc=andersson@kernel$(echo .)org \
    --cc=andrey.konovalov@linaro$(echo .)org \
    --cc=bhupesh.sharma@linaro$(echo .)org \
    --cc=bmasney@redhat$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=edumazet@google$(echo .)com \
    --cc=hisunil@quicinc$(echo .)com \
    --cc=joabreu@synopsys$(echo .)com \
    --cc=jonathanh@nvidia$(echo .)com \
    --cc=jsuraj@qti$(echo .)qualcomm.com \
    --cc=konrad.dybcio@linaro$(echo .)org \
    --cc=krzysztof.kozlowski+dt@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-arm-msm@vger$(echo .)kernel.org \
    --cc=linux-clk@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-stm32@st-md-mailman$(echo .)stormreply.com \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=mcoquelin.stm32@gmail$(echo .)com \
    --cc=mohammad.athari.ismail@intel$(echo .)com \
    --cc=mturquette@baylibre$(echo .)com \
    --cc=ncai@quicinc$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=peppe.cavallaro@st$(echo .)com \
    --cc=richardcochran@gmail$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=ruppala@nvidia$(echo .)com \
    --cc=sboyd@kernel$(echo .)org \
    --cc=tee.min.tan@linux$(echo .)intel.com \
    --cc=veekhee@apple$(echo .)com \
    --cc=vkoul@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox