public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org,
	Paolo Abeni <pabeni@redhat.com>
Subject: [PATCH net-next 11/14] net: stmmac: make dma_cfg mixed/fixed burst boolean
Date: Fri, 27 Feb 2026 09:53:59 +0000	[thread overview]
Message-ID: <E1vvuXn-0000000AvnX-4A1u@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <aaFpZvuIzOLaNM0m@shell.armlinux.org.uk>

struct stmmac_dma_cfg mixed_burst/fixed_burst members are both boolean
in nature - of_property_read_bool() are used to read these from DT, and
they are only tested for non-zero values. Use bool to avoid unnecessary
padding in this structure.

Update dwmac-intel to initialise these using true rather than '1', and
remove the '0' initialisers as the struct is already zero initialised
on allocation.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 +---
 include/linux/stmmac.h                            | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 92d77b0c2f54..ece2a0c38562 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -636,8 +636,6 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
 
 	plat->dma_cfg->pbl = 32;
 	plat->dma_cfg->pblx8 = true;
-	plat->dma_cfg->fixed_burst = 0;
-	plat->dma_cfg->mixed_burst = 0;
 	plat->dma_cfg->aal = 0;
 	plat->dma_cfg->dche = true;
 
@@ -1106,7 +1104,7 @@ static int quark_default_data(struct pci_dev *pdev,
 
 	plat->dma_cfg->pbl = 16;
 	plat->dma_cfg->pblx8 = true;
-	plat->dma_cfg->fixed_burst = 1;
+	plat->dma_cfg->fixed_burst = true;
 	/* AXI (TODO) */
 
 	return 0;
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index cc6c89769d82..84dea8c4fa65 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -97,8 +97,8 @@ struct stmmac_dma_cfg {
 	int txpbl;
 	int rxpbl;
 	bool pblx8;
-	int fixed_burst;
-	int mixed_burst;
+	bool fixed_burst;
+	bool mixed_burst;
 	bool aal;
 	bool eame;
 	bool multi_msi_en;
-- 
2.47.3


  parent reply	other threads:[~2026-02-27  9:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27  9:52 [PATCH net-next 00/14] net: stmmac: further cleanups Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 01/14] net: stmmac: clean up formatting in stmmac_mac_finish() Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 02/14] net: stmmac: remove plat_dat->port_node Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 03/14] net: stmmac: remove .get_tx_owner() Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 04/14] net: stmmac: remove .get_tx_ls() Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 05/14] net: stmmac: remove .get_tx_len() Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 06/14] net: stmmac: remove dwmac4 DMA_CHAN_INTR_DEFAULT_[TR]X* Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 07/14] net: stmmac: remove dwmac410_(enable|disable)_dma_irq Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 08/14] net: stmmac: remove mac->xlgmac Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 09/14] net: stmmac: make extend_desc boolean Russell King (Oracle)
2026-02-27  9:53 ` [PATCH net-next 10/14] net: stmmac: make chain_mode a boolean Russell King (Oracle)
2026-02-27  9:53 ` Russell King (Oracle) [this message]
2026-02-27  9:54 ` [PATCH net-next 12/14] net: stmmac: move initialisation of dma_cfg->atds Russell King (Oracle)
2026-02-27  9:54 ` [PATCH net-next 13/14] net: stmmac: simplify atds initialisation Russell King (Oracle)
2026-02-27  9:54 ` [PATCH net-next 14/14] net: stmmac: move DMA configuration validation to driver probe Russell King (Oracle)
2026-03-03  4:47 ` [PATCH net-next 00/14] net: stmmac: further cleanups patchwork-bot+netdevbpf

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=E1vvuXn-0000000AvnX-4A1u@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox