]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: make dma_cfg mixed/fixed burst boolean
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 27 Feb 2026 09:53:59 +0000 (09:53 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2026 02:35:06 +0000 (18:35 -0800)
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>
Link: https://patch.msgid.link/E1vvuXn-0000000AvnX-4A1u@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
include/linux/stmmac.h

index 92d77b0c2f54b62510da59714a1bc84b746dae7d..ece2a0c38562be4dd1174fbd76117a74ecfdfaaa 100644 (file)
@@ -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;
index 77e51eaa5ec52b91dbd37999fb24458918d4bb82..2fc169c7117e7b3813015ce8ec22cf4e471ced25 100644 (file)
@@ -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;