From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B855D2ECF7 for ; Tue, 20 Jan 2026 11:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=El/hTLjOq6TJZMeNKman36RM/GJ2+dwThbc8HUiTt/U=; b=DVPoHAquDgO1pmjaOrrvbdU3FX CjWmxM1MURqWcSd916l5yCzO+GDBcP1Pa5uNUPexqcaBXp/0mwgcuELHO9ud9OERtpgzV05fKY13l aWbQL+R5AvhQviqRNHSJRsYtFeukvF659dDd7txEbzkkZk2BajChefpncUVg/m+ibW56EHJohfYQy VXdquxyWqiFVYJKcmI98j33HMxXhBiW8o3WwoUNibwqQHIS/dEG3z4jnDaG/+V5T1jVVAbDk2alZ7 xjptUZ1OdFlmyws67G2stsFuSofHVhoum1Rznt+jeJBWrA3u8n3/FDPMNed+yLg/ExsW0b5UCDQvl 7hc3EDfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vi9yJ-00000003ihD-2ui3; Tue, 20 Jan 2026 11:32:31 +0000 Received: from woodpecker.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4] helo=smtp.gentoo.org) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vi9yD-00000003igo-2lsH; Tue, 20 Jan 2026 11:32:30 +0000 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260120_033225_753244_475AB4E6 X-CRM114-Status: GOOD ( 16.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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)