From: Markus Elfring <Markus.Elfring@web.de>
To: Wei Fang <wei.fang@nxp.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
imx@lists.linux.dev, Andrew Lunn <andrew@lunn.ch>,
Clark Wang <xiaoning.wang@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Shenwei Wang <shenwei.wang@nxp.com>
Cc: Julia Lawall <julia.lawall@inria.fr>,
Peter Zijlstra <peterz@infradead.org>,
Simon Horman <horms@kernel.org>, Waiman Long <longman@redhat.com>
Subject: Re: [PATCH v2 net-next] net: fec: Convert fec driver to use lock guards
Date: Sun, 23 Jun 2024 13:01:08 +0200 [thread overview]
Message-ID: <657b4098-60b8-4522-8ea0-f10aa338e1b6@web.de> (raw)
In-Reply-To: <20240511030229.628287-1-wei.fang@nxp.com>
> 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.kernel.org/linux-kernel/AM0PR0402MB38910DB23A6DABF1C074EF1D88E52@AM0PR0402MB3891.eurprd04.prod.outlook.com/
https://lkml.org/lkml/2024/5/8/77
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.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc4#n81
Under which circumstances will development interests grow for further approaches
according to the presentation of similar change combinations?
Regards,
Markus
next prev parent reply other threads:[~2024-06-23 11:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 3:02 [PATCH v2 net-next] net: fec: Convert fec driver to use lock guards Wei Fang
2024-05-11 14:29 ` Andrew Lunn
2024-05-13 1:21 ` Wei Fang
2024-06-23 11:01 ` Markus Elfring [this message]
2024-06-23 11:43 ` Markus Elfring
2024-06-24 1:35 ` [PATCH v2 net-next] " Wei Fang
2024-06-24 6:33 ` [v2] " Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=657b4098-60b8-4522-8ea0-f10aa338e1b6@web.de \
--to=markus.elfring@web.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=imx@lists.linux.dev \
--cc=julia.lawall@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=longman@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=richardcochran@gmail.com \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox