From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796096336; b=Gk+aqTNuHCCDNIQuDTgGE5n66kSU6zhXaW+Mcy9yut9us592wL/vN1uGG+EIDYTS59VW aZJ7QKXao6bT8KT54rEKwgsCfZ2TaZlMcsUA1sBF7FjtQOrIZcCNofg71/FteqJ2KF/Xx imQLQlMnxWETSWNwNIZCHlkswi334Jc7RWnH6RH+nhCUYvyPcfdI3Vw174fZReCKoRIX/ hSdheEdohZRAtb2VBir6DwqZt8B6gfQQ75N1vqZ1Z8z8crN4v5bopADkCODwX/f5T6UUl L9CW7tPLDqP9sqp4Cq/NFP99H4ja4wzNJ+hx/PdqeI7/cSwTXv0fdEHSH5ck8Zj58gQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796096336; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=EYueSddQXqMGx2kuJ3Ay+hEYkHcc7bEQO4sAshSEN2A=; b=WQ5JiYr13B7r1OgqRdqmZ4UN47DN8VCJq6aUlF1cNlKl9fKl2xPF7kIg+KZCEPcVp9NF /kHPvNd9X0cK4ZhKGR/Wwzl+Daekf2Pne0Y7o99bbfIpy2bjg8H9mSRJ+aJDWpwCg65JQ ElPqVCkDQh03fqWuuR8AgCx9xhOAJASbk4GjqCfB/VCu/984OhC/a0yumB71g++8Sw+S7 SGCYM/bQ+YHLeOB+IhaAnn/PJXWh5R+DdZy6l+75ec9ML/MoghnSA3oTThjLaxl8PwRxA CL/oX/Rvj49hykv4xJJKE7zvEE02eKEANr6yJQSskj+1nuE55O9JT42iUPmy+sX5vyg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="OfFko8l/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FEE1606A31A for ; Tue, 1 Dec 2026 03:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OfFko8l/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 509901F00893; Tue, 1 Dec 2026 03:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796096335; bh=EYueSddQXqMGx2kuJ3Ay+hEYkHcc7bEQO4sAshSEN2A=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=OfFko8l/oiDvAvbSzBZSlqnYu9ZgCEdm3tJwtIvl5x6RQmA41XTPIk0WuHCWSRQcp 3B2GXPzAAqGO84sTYhazdhHG7lF6TcVpWnzrqqIkU5LU+6Fvq46Vh4kbLLmqvvVPcj fHpjekqk+XExdSWovNdV7s2oIZa3oAHuJlwEcZmHXsnZ8fpPsr1F481y1P5Zg4xax8 KMnITT6d3uxsVCG4G88sI6UYDm40gMBVchFUGhBiBPAs9VA4bcWtVrc7BPGLTDDfPU fHjKc8whiIlqYl80nPfyTPLAsKhOrSEGB0btH+4SY4ujPVejCV1w4SpwUgn+hIoev8 BIh5q7lHfmeVQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v6 2/3] pwm: meson: add the PWM count driver data Reply-To: sashiko-reviews@lists.linux.dev To: "Xianwei Zhao" Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org In-Reply-To: <20261201-s6-s7-pwm-v6-2-703cc13d4da5@amlogic.com> References: <20261201-s6-s7-pwm-v6-0-703cc13d4da5@amlogic.com> <20261201-s6-s7-pwm-v6-2-703cc13d4da5@amlogic.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 03:38:54 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] pwm: meson: MESON_NUM_PWMS retained and literal 2 used in meson_pwm_probe() -- commit 6ed68747213a295ffa942a4e360553ca50e1dfff Author: Xianwei Zhao pwm: meson: add the PWM count driver data This commit adds an npwm field to struct meson_pwm_data, sets it to 2 for existing variants, and replaces MESON_NUM_PWMS with chip->npwm and pdata->npwm in clock initialization and probe. > diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c > index 3a28c853089f8..a4b5f38776070 100644 > --- a/drivers/pwm/pwm-meson.c > +++ b/drivers/pwm/pwm-meson.c [ ... ] > @@ -699,9 +710,12 @@ static int meson_pwm_probe(struct platform_device *p= dev) > { > struct pwm_chip *chip; > struct meson_pwm *meson; > + const struct meson_pwm_data *pdata =3D of_device_get_match_data(&pdev->= dev); > int err; > =20 > - chip =3D devm_pwmchip_alloc(&pdev->dev, MESON_NUM_PWMS, sizeof(*meson)); > + if (pdata->npwm > 2) > + return -EINVAL; > + chip =3D devm_pwmchip_alloc(&pdev->dev, pdata->npwm, sizeof(*meson)); [Severity: Low] As reported by Uwe Kleine-K=C3=B6nig on v4 [1], can MESON_NUM_PWMS be dropp= ed in this commit? It is still defined to size meson_pwm_per_channel_data[] and meson->channels[], while meson_pwm_probe() checks pdata->npwm > 2 using a literal 2 instead of sizing meson_pwm_per_channel_data[] and meson->channels[] without the macro and bounding against ARRAY_SIZE(). [1] https://lore.kernel.org/r/aw01OAIy4gGjXvDI@monoceros --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-s6-s7-pwm-= v6-0-703cc13d4da5@amlogic.com?part=3D2