[PATCH net-next 1/2] net: stmmac: fix unsafe MTL DMA macro

Jakub Kicinski kuba at kernel.org
Mon Oct 24 21:00:19 PDT 2022


On Fri, 21 Oct 2022 19:47:10 +0800 Junxiao Chang wrote:
> Macro like "#define abc(x) (x, x)" is unsafe which might introduce
> 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.
> 
> Fixes: d43042f4da3e ("net: stmmac: mapping mtl rx to dma channel")

You need to point out an existing usage where this is causing problems,
otherwise this is not a fix.

And squash the two patches together, it's going to be easier to review.



More information about the linux-arm-kernel mailing list