All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: netdev@vger.kernel.org, nbd@nbd.name, john@phrozen.org,
	sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	lorenzo.bianconi@redhat.com, sujuan.chen@mediatek.com,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next 5/5] net: ethernet: mtk_wed: add reset to tx_ring_setup callback
Date: Mon, 21 Nov 2022 20:19:17 -0800	[thread overview]
Message-ID: <20221121201917.080365ce@kernel.org> (raw)
In-Reply-To: <Y3vrKcqlmxksq1rC@lore-desk>

On Mon, 21 Nov 2022 22:18:33 +0100 Lorenzo Bianconi wrote:
> > On Mon, 21 Nov 2022 09:59:25 +0100 Lorenzo Bianconi wrote:  
> > > +#define mtk_wed_device_tx_ring_setup(_dev, _ring, _regs, _reset) \
> > > +	(_dev)->ops->tx_ring_setup(_dev, _ring, _regs, _reset)  
> > 
> > FWIW I find the "op macros" quite painful when trying to read a driver
> > I'm not familiar with. stmmac does this, too. Just letting you know,
> > it is what it is.  
> 
> ack, fine. I maintained the approach currently used in the driver.
> Do you prefer to run the function pointer directly?

That's a tiny bit better, yes, saves the reader one lookup.

Are the ops here serving as a HAL or a way of breaking the dependency
between the SoC/Eth and the WiFi drivers? 


  reply	other threads:[~2022-11-22  4:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  8:59 [PATCH net-next 0/5] refactor mtk_wed code to introduce SER support Lorenzo Bianconi
2022-11-21  8:59 ` [PATCH net-next 1/5] net: ethernet: mtk_wed: return status value in mtk_wdma_rx_reset Lorenzo Bianconi
2022-11-21 16:55   ` Alexander Lobakin
2022-11-21 17:34     ` Lorenzo Bianconi
2022-11-21  8:59 ` [PATCH net-next 2/5] net: ethernet: mtk_wed: move MTK_WDMA_RESET_IDX_TX configuration in mtk_wdma_tx_reset Lorenzo Bianconi
2022-11-21  8:59 ` [PATCH net-next 3/5] net: ethernet: mtk_wed: update mtk_wed_stop Lorenzo Bianconi
2022-11-21  8:59 ` [PATCH net-next 4/5] net: ethernet: mtk_wed: add mtk_wed_rx_reset routine Lorenzo Bianconi
2022-11-21  8:59 ` [PATCH net-next 5/5] net: ethernet: mtk_wed: add reset to tx_ring_setup callback Lorenzo Bianconi
2022-11-21 20:17   ` Jakub Kicinski
2022-11-21 21:18     ` Lorenzo Bianconi
2022-11-22  4:19       ` Jakub Kicinski [this message]
2022-11-22  9:41         ` Felix Fietkau
2022-11-22 19:13           ` Jakub Kicinski

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=20221121201917.080365ce@kernel.org \
    --to=kuba@kernel.org \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john@phrozen.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=sujuan.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.