[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN9PR11MB537004886CC12D8ACE7CCF87EC319@BN9PR11MB5370.namprd11.prod.outlook.com>
Date: Tue, 25 Oct 2022 04:58:12 +0000
From: "Chang, Junxiao" <junxiao.chang@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
"alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>,
"joabreu@...opsys.com" <joabreu@...opsys.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
"Joao.Pinto@...opsys.com" <Joao.Pinto@...opsys.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next 1/2] net: stmmac: fix unsafe MTL DMA macro
Thank you for reviewing it. There is no real issue if this macro only be used in stmmac driver and parameter is not function or "i++".
I will squash these two patches.
Regards,
Junxiao
-----Original Message-----
From: Jakub Kicinski <kuba@...nel.org>
Sent: Tuesday, October 25, 2022 12:00 PM
To: Chang, Junxiao <junxiao.chang@...el.com>
Cc: peppe.cavallaro@...com; alexandre.torgue@...s.st.com; joabreu@...opsys.com; davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com; mcoquelin.stm32@...il.com; Joao.Pinto@...opsys.com; netdev@...r.kernel.org; linux-stm32@...md-mailman.stormreply.com; linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: stmmac: fix unsafe MTL DMA macro
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.
Powered by blists - more mailing lists