summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2026-03-09 12:39:34 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-11 05:54:07 +0300
commit94808793fed71ee47741df0923d353024b6904ff (patch)
treef2feccae499cf348b8c1fb9b213365b59a9bdcb9 /include
parent3357642e65e9454c3da64b62c0ed987ee4010008 (diff)
downloadlinux-94808793fed71ee47741df0923d353024b6904ff.tar.xz
net: stmmac: use u8 for ?x_queues_to_use and number_?x_queues
The maximum number of queues is a compile time constant of only eight. This makes using a 32-bit quantity wastefulf. Instead, use u8 for these and their associated variables. When reading the DT properties, saturdate at U8_MAX. Provided the core provides DMA capabilities to describe the number of queues, this will be capped by stmmac_hw_init() with a warning. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/E1vzX5K-0000000CVsE-0J0Y@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/stmmac.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 411cdd3ea034..03fd85060a73 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -244,8 +244,8 @@ struct plat_stmmacenet_data {
int tx_fifo_size;
int rx_fifo_size;
u32 host_dma_width;
- u32 rx_queues_to_use;
- u32 tx_queues_to_use;
+ u8 rx_queues_to_use;
+ u8 tx_queues_to_use;
u8 rx_sched_algorithm;
u8 tx_sched_algorithm;
struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES];