From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f171.google.com (mail-dy1-f171.google.com [74.125.82.171]) (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 D1B4B3EDACF for ; Tue, 20 Jan 2026 11:43:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768909429; cv=none; b=sT96mDSi2CuoVcIuuAwXgU3NTol/Of6AYozy2yYpammsQV1N/RxJyA3E0hdNi+cN2+G8Ja8AzLJZETpYRwfYmRrPfYZK4FgGPlcymTJPTZoUcOGsI7fRJqcbuzYB7/8WDRRol3b7x6ujcwdV5V/vMFDWxlERenooUcVtcUIVwcg= 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.171 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-f171.google.com with SMTP id 5a478bee46e88-2b4520f6b32so7078894eec.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=lD6rNj/unybYyk8TrnF/wK3LrIASU8n7riSOI+ad2kCnjHC4ch0646voxIgdNZRrbc 8C1BNkvqI8wLN31zOsz9z4h5ly/LMlJ2C9a9Ait0AM+Zx76fitz5i7hcEEYhxOar1Vod z4SL7zVUlcxegHndV5L7e6uSAGpcE/yuvZeu0kGNWvixeY/z+G7zJpuy78jKxszJDgb4 xiufbgwqksxFe88W/vHl+ep3V2f1c/wuFUKbKdEKkqO3F4F1CC8kcHxK77EIzD5gbDA9 eJvmsYLORNDi+cYNKy/mF1+dBhUOm+I7gNNiL5T38EUOcvf3ckzPDZ/+yFfO8pbaQOus IYPA== X-Forwarded-Encrypted: i=1; AJvYcCX35fQZLyuLPFZ48d7LfPscP1qxUf6UFgBXrK3DqMqQcGZNDzRwm9WVQ6g5pHENacqd0bBbj0kpx810@vger.kernel.org X-Gm-Message-State: AOJu0YyspdI+fPoNxuwCrCAuqxW9fGd91C4xG/9+CZ9qZHDbhItH8vLp 7YjfhaHKscTIkoOmQSn4UQSpN4dCanNP+IbPlVakInlGnH22cjMqlTht X-Gm-Gg: AZuq6aIjGYoVUuMg/xLugnHZMlXRS2G2ptoQNDZIOzjG7TWuWY55T39sp3mGDZt7zpJ izRV6HIUDPi9z1PpqohPcHGJpVBXg3mZr4wZanjYLZAx72zns1oNwp4MjXjGAUUs8JXCqsQvoZV +QNnQe+4PISF8zxEJbCkGJMirCbuaYBYEaX+QkaFwhm1XEIlmb066SDfiHV1JCR26jMQ2yJUxQF SHrZFEik1b5j+iWpsA5HynqgCPXB22PWmNGw7TXOlvE7ZmZlQyAcAkxkV5OVQmlhfoALv5BK19A +8KsLXzsdIBtkzz+J38TpAYwyZdaIUyY2nJx5YLOEMylsWnLBVJpVcWggCkIAnfPEyAv16YqLV4 j/gYbZhYpWerIBx3YHxD+9f70v3ieIaa653eZNFckyBQrPO/sJvRmkIiJSOKn/R81jhQutl+vRL 9N8pbQ9ez8ZA== 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: devicetree@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