From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC1103E9594; Tue, 20 Jan 2026 11:32:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908744; cv=none; b=YYUwWchs0ixxHVo66o142/tl01bLyiz/PDNZhrhbzNK68RyIMQ2/IIKd9Cf6N/L+HlHn26ha1SC03CMGKqSL3JFudmFkrdH+VkwvE2yd/oisauLaZXXtvcseBJjpZgY+5EdfhbmGpRCqn3VDOIXeqZBz2qWXoss8N5TkPJ28RD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908744; c=relaxed/simple; bh=XjDhwPI4WMJsvQYN9WpNAugsQnaD8nxjol8hVGKtflI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eMDbliNWQsUbXK/nQrQGE+asOA++5JxRiSAm7Px7AO8+rhPR++bqJ1qC6oLPVX0tFarlZGPFf01uJrKqlZYH2TNvUYvxhz8EWzkZnMwiN/0pSSc/c1VTUBJIlWDm60kHmUlehPSGZXsbZebWFKEj+M5EomKQ88tFV1YoUvcskLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org; spf=pass smtp.mailfrom=gentoo.org; arc=none smtp.client-ip=140.211.166.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentoo.org Received: from localhost (unknown [116.232.27.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dlan) by smtp.gentoo.org (Postfix) with ESMTPSA id B15B9341064; Tue, 20 Jan 2026 11:32:18 +0000 (UTC) Date: Tue, 20 Jan 2026 19:32:07 +0800 From: Yixun Lan To: Yao Zi Cc: Inochi Amaoto , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , "Russell King (Oracle)" , Yanteng Si , Yao Zi , Vladimir Oltean , Lad Prabhakar , Choong Yong Liang , Maxime Chevallier , Chen-Yu Tsai , Shangjuan Wei , Boon Khai Ng , Quentin Schulz , Giuseppe Cavallaro , Jose Abreu , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Longbin Li Subject: Re: [PATCH net-next 3/3] net: stmmac: Add glue layer for Spacemit K3 SoC Message-ID: <20260120113207-GYB56672@gentoo.org> References: <20260120043609.910302-1-inochiama@gmail.com> <20260120043609.910302-4-inochiama@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > --- > > 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)