[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB85106653965E0694C2C84E4C88D42@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Mon, 24 Jun 2024 01:35:24 +0000
From: Wei Fang <wei.fang@....com>
To: Markus Elfring <Markus.Elfring@....de>
CC: Julia Lawall <julia.lawall@...ia.fr>, Peter Zijlstra
<peterz@...radead.org>, Simon Horman <horms@...nel.org>, Waiman Long
<longman@...hat.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>, Andrew Lunn <andrew@...n.ch>,
Clark Wang <xiaoning.wang@....com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>, Richard Cochran <richardcochran@...il.com>,
Shenwei Wang <shenwei.wang@....com>
Subject: RE: [PATCH v2 net-next] net: fec: Convert fec driver to use lock
guards
> -----Original Message-----
> From: Markus Elfring <Markus.Elfring@....de>
> Sent: 2024年6月23日 19:01
> To: Wei Fang <wei.fang@....com>; netdev@...r.kernel.org;
> kernel-janitors@...r.kernel.org; imx@...ts.linux.dev; Andrew Lunn
> <andrew@...n.ch>; Clark Wang <xiaoning.wang@....com>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub
> Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Richard
> Cochran <richardcochran@...il.com>; Shenwei Wang
> <shenwei.wang@....com>
> Cc: Julia Lawall <julia.lawall@...ia.fr>; Peter Zijlstra <peterz@...radead.org>;
> Simon Horman <horms@...nel.org>; Waiman Long <longman@...hat.com>
> 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.
Powered by blists - more mailing lists