> -----Original Message----- > From: Markus Elfring <Markus.Elfring@xxxxxx> > Sent: 2024年6月23日 19:01 > To: Wei Fang <wei.fang@xxxxxxx>; netdev@xxxxxxxxxxxxxxx; > kernel-janitors@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; Andrew Lunn > <andrew@xxxxxxx>; Clark Wang <xiaoning.wang@xxxxxxx>; David S. Miller > <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub > Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Richard > Cochran <richardcochran@xxxxxxxxx>; Shenwei Wang > <shenwei.wang@xxxxxxx> > Cc: Julia Lawall <julia.lawall@xxxxxxxx>; Peter Zijlstra <peterz@xxxxxxxxxxxxx>; > Simon Horman <horms@xxxxxxxxxx>; Waiman Long <longman@xxxxxxxxxx> > Subject: Re: [PATCH v2 net-next] net: fec: Convert fec driver to use lock > guards > > > The Scope-based resource management mechanism has been introduced > into > … > scope? was? > > > … > > +++ b/drivers/net/ethernet/freescale/fec_ptp.c > > @@ -99,18 +99,17 @@ > > */ > > static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint > > enable) { > > - unsigned long flags; > > u32 val, tempval; > > struct timespec64 ts; > > u64 ns; > > > > - if (fep->pps_enable == enable) > > - return 0; > > - > > fep->pps_channel = DEFAULT_PPS_CHANNEL; > > fep->reload_period = PPS_OUPUT_RELOAD_PERIOD; > > > > - spin_lock_irqsave(&fep->tmreg_lock, flags); > > + guard(spinlock_irqsave)(&fep->tmreg_lock); > > + > > + if (fep->pps_enable == enable) > > + return 0; > > > > if (enable) { > > /* clear capture or output compare interrupt status if have. > … > > Was this source code adjustment influenced also by a hint about “LOCK > EVASION” > from the analysis tool “Coverity”? > https://lore.k/ > ernel.org%2Flinux-kernel%2FAM0PR0402MB38910DB23A6DABF1C074EF1D > 88E52%40AM0PR0402MB3891.eurprd04.prod.outlook.com%2F&data=05%7 > C02%7Cwei.fang%40nxp.com%7Cd6bfb97d5f854c511a3c08dc9373d064%7 > C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6385473728254555 > 50%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=m9oRx%2FI > z%2FLu1%2BlcQMRUlHsDfNznfVlJgbVwPramiEdA%3D&reserved=0 > https://lkml.o/ > rg%2Flkml%2F2024%2F5%2F8%2F77&data=05%7C02%7Cwei.fang%40nxp.c > om%7Cd6bfb97d5f854c511a3c08dc9373d064%7C686ea1d3bc2b4c6fa92cd > 99c5c301635%7C0%7C0%7C638547372825465871%7CUnknown%7CTWFp > bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC > I6Mn0%3D%7C0%7C%7C%7C&sdata=yEmDaP33Ss4FzUHv2IFkmGLV8udn9z1 > kAFzi01idssU%3D&reserved=0 > > Will any tags (like “Fixes” and “Cc”) become relevant here? > > How do you think about to take the known advice “Solve only one problem > per patch” > better into account? > https://git.ker/ > nel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2 > Ftree%2FDocumentation%2Fprocess%2Fsubmitting-patches.rst%3Fh%3Dv6. > 10-rc4%23n81&data=05%7C02%7Cwei.fang%40nxp.com%7Cd6bfb97d5f854 > c511a3c08dc9373d064%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C > 0%7C638547372825472413%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C% > 7C%7C&sdata=Lc2BsYHMzGkAgSsZ3pNdnvl8OlDtTL7pb0CNhD%2Bz2fg%3D& > reserved=0 > > Under which circumstances will development interests grow for further > approaches according to the presentation of similar change combinations? > Hi Markus, This patch has been rejected because netdev people don't want these sort of conversions at present which will make backporting more difficult. The LOCK EVASION issue has been fixed by another patch.