[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260120113207-GYB56672@gentoo.org>
Date: Tue, 20 Jan 2026 19:32:07 +0800
From: Yixun Lan <dlan@...too.org>
To: Yao Zi <me@...ao.cc>
Cc: Inochi Amaoto <inochiama@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Richard Cochran <richardcochran@...il.com>,
Paul Walmsley <pjw@...nel.org>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Yanteng Si <siyanteng@...oftware.com.cn>,
Yao Zi <ziyao@...root.org>,
Vladimir Oltean <vladimir.oltean@....com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Choong Yong Liang <yong.liang.choong@...ux.intel.com>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Chen-Yu Tsai <wens@...nel.org>,
Shangjuan Wei <weishangjuan@...incomputing.com>,
Boon Khai Ng <boon.khai.ng@...era.com>,
Quentin Schulz <quentin.schulz@...rry.de>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Jose Abreu <joabreu@...opsys.com>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
Longbin Li <looong.bin@...il.com>
Subject: Re: [PATCH net-next 3/3] net: stmmac: Add glue layer for Spacemit K3
SoC
Hi Yao,
On 11:13 Tue 20 Jan , Yao Zi wrote:
> On Tue, Jan 20, 2026 at 12:36:08PM +0800, Inochi Amaoto wrote:
> > Adds Spacemit dwmac driver support on the Spacemit K3 SoC.
> >
> > Signed-off-by: Inochi Amaoto <inochiama@...il.com>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/Kconfig | 12 +
> > drivers/net/ethernet/stmicro/stmmac/Makefile | 1 +
> > .../ethernet/stmicro/stmmac/dwmac-spacemit.c | 224 ++++++++++++++++++
> > 3 files changed, 237 insertions(+)
> > create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c
>
>
> ...
>
> > +static int spacemit_dwmac_probe(struct platform_device *pdev)
> > +{
>
> ...
>
> > + of_property_read_u32(pdev->dev.of_node, "tx-internal-delay-ps", &tx_delay);
> > + of_property_read_u32(pdev->dev.of_node, "rx-internal-delay-ps", &rx_delay);
>
> According to of.h, of_property_read_u32, which in turn calls
> of_property_read_u32_array, could fail with -ENODATA if there's no value
> associated with the property. Should the case be handled?
>
I think it should be safe, see the comment
*
* The out_values is modified only if a valid u64 value can be decoded.
*/
static inline int of_property_read_u64_array(const struct device_node *np,
const char *propname,
u64 *out_values, size_t sz)
{
..
if the function fail then it will use default value which assigned already
at initialization stage.
--
Yixun Lan (dlan)
Powered by blists - more mailing lists