From: "Alexis Lothoré" <alexis.lothore@bootlin•com>
To: "Russell King (Oracle)" <linux@armlinux•org.uk>
Cc: "Andrew Lunn" <andrew+netdev@lunn•ch>,
"David S. Miller" <davem@davemloft•net>,
"Eric Dumazet" <edumazet@google•com>,
"Jakub Kicinski" <kuba@kernel•org>,
"Paolo Abeni" <pabeni@redhat•com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail•com>,
"Alexandre Torgue" <alexandre.torgue@foss•st.com>,
"Richard Cochran" <richardcochran@gmail•com>,
"Daniel Machon" <daniel.machon@microchip•com>,
"Maxime Chevallier" <maxime.chevallier@bootlin•com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin•com>,
<netdev@vger•kernel.org>,
<linux-stm32@st-md-mailman•stormreply.com>,
<linux-arm-kernel@lists•infradead.org>,
<linux-kernel@vger•kernel.org>
Subject: Re: [PATCH net 2/2] net: stmmac: fix multiplication overflow when reading timestamp
Date: Tue, 22 Apr 2025 18:06:18 +0200 [thread overview]
Message-ID: <D9DAOEKXJKQB.HHD75KOLKIW1@bootlin.com> (raw)
In-Reply-To: <aAe2iULNthghEEEt@shell.armlinux.org.uk>
Hello Russell,
On Tue Apr 22, 2025 at 5:32 PM CEST, Russell King (Oracle) wrote:
> On Tue, Apr 22, 2025 at 05:07:23PM +0200, Alexis Lothoré wrote:
>> ns = readl(ptpaddr + GMAC_PTP_ATNR);
>> - ns += readl(ptpaddr + GMAC_PTP_ATSR) * NSEC_PER_SEC;
>> + ns += (u64)(readl(ptpaddr + GMAC_PTP_ATSR)) * NSEC_PER_SEC;
>
> I'm not sure what the extra parens around readl() are actually trying to
> do. Please drop them if they're not useful.
They are indeed not specifically useful in this case, they will be dropped
in v2.
Thanks,
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2025-04-22 16:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 15:07 [PATCH net 0/2] net: stmmac: fix timestamp snapshots on dwmac1000 Alexis Lothore
2025-04-22 15:07 ` [PATCH net 1/2] net: stmmac: fix dwmac1000 ptp timestamp status offset Alexis Lothore
2025-04-22 15:49 ` Maxime Chevallier
2025-04-22 16:11 ` Alexis Lothoré
2025-04-22 15:07 ` [PATCH net 2/2] net: stmmac: fix multiplication overflow when reading timestamp Alexis Lothoré
2025-04-22 15:32 ` Russell King (Oracle)
2025-04-22 16:06 ` Alexis Lothoré [this message]
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=D9DAOEKXJKQB.HHD75KOLKIW1@bootlin.com \
--to=alexis.lothore@bootlin$(echo .)com \
--cc=alexandre.torgue@foss$(echo .)st.com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=daniel.machon@microchip$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-stm32@st-md-mailman$(echo .)stormreply.com \
--cc=linux@armlinux$(echo .)org.uk \
--cc=maxime.chevallier@bootlin$(echo .)com \
--cc=mcoquelin.stm32@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=richardcochran@gmail$(echo .)com \
--cc=thomas.petazzoni@bootlin$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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