From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172]) (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 DBB6B407577 for ; Tue, 20 Jan 2026 11:43:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768909429; cv=none; b=NRcJk8jVIy1a7xsqciOyHzOBiXJl998DsMxazRG+qKMbGyI+/HS/lkkhWfhfjTwyNn83JFUT6b45Hg4Sl4y8bNg4R5hZy/srb6rE3nicFMg8bpVicOcJMQkNk3NdwUxqnkgvEl9NfMXfMmbz+n65bSYo4ryhKtbzktERX6eFHxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768909429; c=relaxed/simple; bh=gcLF48OQAJqjairFH8eR92suY9fBYKsnj8NxKel1wV4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DZ21VxIeSRT8BjNUy+AOnFd6i7bNJNxXGCUN6AyKZVUyldAprlJI+CMVJyizMr6VI2dXgvxAOuwZ0DKnpRVCS063lsqL80PPdTPsDiQhMdWB8E2L42hvH8Ye88fmNam2GPg+oYWjzw23icJ/NER/D+8/pBChUHaKxb1Et2ZF2b8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fBoPr2th; arc=none smtp.client-ip=74.125.82.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fBoPr2th" Received: by mail-dy1-f172.google.com with SMTP id 5a478bee46e88-2b4520f6b32so7078903eec.0 for ; Tue, 20 Jan 2026 03:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768909427; x=1769514227; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=KEeKRKNgnXmWzaKf1C0tW6uj5QVjxVimCmm99Tj3C3c=; b=fBoPr2thtrJ7IKXqOqlk3jkwWCLQZ78B67lQ/mVvViQCxtCtqI1qpv3jwIgLjiKd+Y /XDUv5FrDOO8JGdJY1bYBRxXo5BiI9kFZI7ZP0MIy/NjK0PVNZkkzZFrlnlPBg96/xKA cZdCUrvnoILnw3CNjNSDAWrXHTSMtReMbLN4aQ2f4QRs8Qsn56vUhmmud+D3zkeNpOX6 6rvvkgzyeq7ThI3/OLBTWniItCcJQpTvMaWqzpwvRiHgIW7aBSeQ4sH/mbmzoo6D1jaI zzBFbztWoN2eFnFrlOqx0xNu8fJUwqszvXkMfiYPFxA205HdDeuOubM+0DtAeXx5zP/c VuBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768909427; x=1769514227; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KEeKRKNgnXmWzaKf1C0tW6uj5QVjxVimCmm99Tj3C3c=; b=leNaSTvLe8sG+Nz9rM5OKbrjKmzyauyujh85K6i3aTyOAJQOs6/zaNktm+nBWHdJQ5 nvlfa1o1lFJmlEJAumDgFtFQ6XSQhICvkhzZ9ZzUZYqCUsK/GloQ97SkYAbZtLvvg9rp fco669+Mkz930uWDsnDJCRMIfj6otvBPxKlo2iAUc3LeuIhxlvY2LB5EPWBL45KAA45U VRrtidAO/8JOjGFVSvlQX2kqK6MGIlGzENNYUY/uZfenw9VAfaCV7Htt0pyErate+Ul0 OKnNNPREV63I4zv8sNxekvcVCdFgnigFCWrX5C6kN/E9xucF/W1+Bgks1F8GOdQKrBEd yicA== X-Forwarded-Encrypted: i=1; AJvYcCWkGJ+TyhU63193BM2KhV09+SI4elnRXweFIhLpJFBX6yOZxsZaY+QAdgh3Q466aIV8Xg99adOfOS7rmRI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxw2V9oBFUdOMdHqP4aorf7wn5nmSTtQdVvjxsZf0h/MUMOU4lk hrKrmGY7nJSsvkcLYp0R9Vm+jS5r1jHyxqWZjIGCNEHaXoxJbv4piLoN X-Gm-Gg: AZuq6aIPI3cdHG/+kol2dCtLfY3ugj0UvJmB/6qBrT26EJfEGTkPBDelqNZV7pBJNBm 31S9C0AMGk78o7qGBi0RsZiID3qk1y/ppRW2JRkNEO3NFgMxMg/LAYZH/gfrI9R+V1DrGv3BnT0 koUcG3GlL0kbAdkjjcOAdpd6uTYlvO4/3CIuSRAgs8uWh62jyfTinT7v+6anqGpL0Vup9fSJ+of 48ZT1vI0PIaeryptObusEDBqDyo0+jscDI8cRa3SqAklImylrGlkoUvylTQd8/yz9ahSDL7YVcW WTAo9EvfsB8MAI6+eY6aIcunR44haby9M7B2FM2wmaxBN0C0S5wGWtglUd+iiZvcNebm2QZ5guV liIdXftNaFgLXMIqN7ou13iuJwbnMjO63Q8yOtFeiQAm1n5ahKV8UfKqyvigJQtlvmCpz3j9bmz NpW9iWN6uIXg== X-Received: by 2002:a05:7301:2b05:b0:2b0:5929:4d1f with SMTP id 5a478bee46e88-2b6fd7add4emr884545eec.33.1768909426655; Tue, 20 Jan 2026 03:43:46 -0800 (PST) Received: from localhost ([2001:19f0:ac00:4eb8:5400:5ff:fe30:7df3]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b34c11dasm18506224eec.2.2026.01.20.03.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 03:43:46 -0800 (PST) Date: Tue, 20 Jan 2026 19:43:36 +0800 From: Inochi Amaoto To: "Russell King (Oracle)" , 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: On Tue, Jan 20, 2026 at 11:28:49AM +0000, Russell King (Oracle) wrote: > 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. > Good catch! I always treat "unsigned int" to "u32" implictly, I will change to u32 for as an precise type. Regards, Inochi