From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 617FF3A9631; Tue, 20 Jan 2026 11:29:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908581; cv=none; b=RbAWCWX510pWsLF1n3SoF5Rgzl3AhLVXv6AHAZHrKojdOvJ3XBhaTVG7PMmoKFN34rp0iQXJD5tNA86vanoEMyzAhhAePuVo9tU/LwyIJKiLQNe4QAsTmbRKMyDho/KsRiPQ3aS4ZlSW/khuOgo38CkD0O1tenUM6q2SBFX+dpg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768908581; c=relaxed/simple; bh=zD8PS2BxyO8mlqAByme4yWQvJMWzaVsGbWniXAdX0VM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BRsEnsUq2KE3bfWOWxFzYX9wJWgDg+aTVIuboj3MDfz+pmbhzEtSQIld1PuSwIDUizDJi+J9BAfMnu7KLKC/CW+NeoG5yAyybAadGSsMgE7sXuzNscdwTa4gpsWe9uY2qyAG54rjhobcS7i9nIXTSDyuuMIKox+5jaeDhnscV2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=hovWwipu; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="hovWwipu" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AjnwvV2BqvE2aPiFrCHPh0/mzQujqmD6N4sIt6a5sZU=; b=hovWwipuHB57LKi4MlszUuI8DP CgD3oSh3KhgWsMTfb486kUstGtEakbhWKS3+1iC5/urnMW79/L40gcwZ5abtlbaHeVDneWxj/KXyX eTJv0JZfc3wkTMmGRw7nkB0HxBhoRPNL5zkIKvCd+Dsv6eBFJLW2/pEYOO2FIvMQl4Su8K1KY6UZi PrXKLOXfxQQycmy+X6n53r84bKvM9JlWyEx096TTXdb2WDyBWNjezyvY8YMZ1iQmo/Hfbr+wGtFAY C9aaJwM1f6p7mnsw1EmmDjJrl5vXbwvoF6LduEgFjCuro5aKLguFLKEm7NSzHR4V0bm8WPRMvX/zN vUNCdoYQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:59282) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vi9us-000000006A6-2vXc; Tue, 20 Jan 2026 11:28:58 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vi9uj-000000007Tq-3hBk; Tue, 20 Jan 2026 11:28:49 +0000 Date: Tue, 20 Jan 2026 11:28:49 +0000 From: "Russell King (Oracle)" To: Yao Zi Cc: Inochi Amaoto , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , 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: References: <20260120043609.910302-1-inochiama@gmail.com> <20260120043609.910302-4-inochiama@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@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: Sender: Russell King (Oracle) On Tue, Jan 20, 2026 at 11:13:50AM +0000, Yao Zi wrote: > On Tue, Jan 20, 2026 at 12:36:08PM +0800, Inochi Amaoto wrote: > > +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? You cut too much. This had: unsigned int tx_delay = 0; unsigned int rx_delay = 0; at the start of the function. of_property_read_u32_array() says: * @out_values: pointer to return value, modified only if return value is 0. and of_property_read_u32() passes &tx_delay or &rx_delay to this. Thus, if any error occurs, these will be zero. In other words, a missing property is equivalent to setting these to zero, which is entirely reasonable. However, "unsigned int" _may_ be type equivalent to "u32", but really these should be "u32" if of_property_read_u32_array() is used. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!