net: stmmac: remove duplicate dma queue channel macros
authorJunxiao Chang <junxiao.chang@intel.com>
Tue, 25 Oct 2022 08:17:47 +0000 (16:17 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 27 Oct 2022 09:36:11 +0000 (11:36 +0200)
commit330543d04f2c9c5924736d81f67b50b925bd0864
treee40014fda9cbe93a51f0a3dd812249a173e1df0b
parent95d9a3dab109f2806980d55634972120824a5a5a
net: stmmac: remove duplicate dma queue channel macros

It doesn't need extra macros for queue 0 & 4. Same macro could
be used for all 8 queues. Related queue/channel functions could
be combined together.

Original macro which has two same parameters is unsafe macro and
might have potential side effects. Each MTL RxQ DMA channel mask
is 4 bits, so using (0xf << chan) instead of GENMASK(x + 3, x) to
avoid unsafe macro.

Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
Link: https://lore.kernel.org/r/20221025081747.1884926-1-junxiao.chang@intel.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/dwmac4.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c