[PATCH net-next 11/14] net: stmmac: make dma_cfg mixed/fixed burst boolean
Russell King (Oracle)
rmk+kernel at armlinux.org.uk
Fri Feb 27 01:53:59 PST 2026
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 at 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
More information about the linux-arm-kernel
mailing list