From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9CE8925B0B8 for ; Wed, 1 Jul 2026 13:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782913949; cv=none; b=uba4e+10QrbUT2MTP/47WEUshcz1KEFB8jHMJaVsVJj2uWAgP/QIefsWwpZiPtamgfJLypaQbhy62XdjiMeFAJ+WQHZwjmkTrP0zBDL/h+0ZDMK+aPsaTTNCSbpWs+k5L/B/5G0ifPAZQceAJ8q6HBRtI0kUjeVruCyD5YNDPqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782913949; c=relaxed/simple; bh=YskM+f4SyHrLY5y6Z+2IJfFUDgaPgpugDx1LFkI/1KI=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=qu0dI9r0uyMD/urjfx9ypZLmZoeocGB/AAdVw7QoG2wmWoZZD2pJnkVkIos3/H09bsuVgbKG5vMD3eretBizmLPHqPiUKRobAo0ZVY3xPQsteICpqsA7pZYp/DBu37ySNgqCQHDRKkBI59JrjI27ak8/yp1WihtHO77WoqPnWLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K9BopHwB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K9BopHwB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B65B1F000E9; Wed, 1 Jul 2026 13:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782913948; bh=VDpaVJlS708zRfOZO5PAB+Hs1J4dA8avvbijsZKglYI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=K9BopHwBV4QcBM24HqDkbv9V68b+IscxN5klKIfPSihejhB+RkXHEyM2HscDhExFc NFDPyypQvojWGwKNAy6s/IcNn/WPe9fexRhQdY7ZICaNrv6iiTq6NWWeuAJqrcj87M NU0hZHnsj3gYn9Qzq7/GJEPdiS42zxhexOAyIv3EGPlcWhleOIp6zy0CpYoECSu3Du +dfL81zU2IWiBNuzOMrhb7Zj7KQItkdoJh19/H+wAh/mh2EHSwNTUTSo+1uzXX+85+ BQyg67wqb2VqcV4fQAFThxFue2VB8qGucpnBoPvYFrEWw2MAZ/D0Mw328L/ENCZEos 8FfKqm73+s2Xw== From: sashiko-bot@kernel.org Subject: Re: [PATCH 2/2] backlight: aw99706: Validate all DT property values consistently Reply-To: sashiko-reviews@lists.linux.dev To: "Junjie Cao" Cc: dri-devel@lists.freedesktop.org, lee@kernel.org, linux-leds@vger.kernel.org In-Reply-To: <20260701133918.33487-2-junjie.cao@linux.dev> References: <20260701133918.33487-1-junjie.cao@linux.dev> <20260701133918.33487-2-junjie.cao@linux.dev> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 01 Jul 2026 13:52:27 +0000 Message-Id: <20260701135228.0B65B1F000E9@smtp.kernel.org> Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: Pre-existing issues: - [High] I2C read performed before enabling the chip via GPIO. -- commit 9b2c49c6b957cfe305a408b8c9b3c4052b039334 Author: Junjie Cao backlight: aw99706: Validate all DT property values consistently The lookup helpers for dim-mode and ramp-ctl take a shortcut when lookup_tbl is NULL: they accept any u32 value without range-checking and return success unconditionally. Out-of-range values get silently truncated by regmap_update_bits instead of triggering the dev_warn + default-fallback path that the other properties use. > diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/= aw99706.c > index e130f164303a2..dfb4b38b5b4c7 100644 > --- a/drivers/video/backlight/aw99706.c > +++ b/drivers/video/backlight/aw99706.c [ ... ] [Severity: High] This is a pre-existing issue, but while reviewing this driver I noticed a potential issue in aw99706_probe(). Does the driver attempt to read the chip ID before enabling the device? drivers/video/backlight/aw99706.c:aw99706_probe() { ... ret =3D aw99706_chip_id_read(aw); if (ret !=3D AW99706_ID) return dev_err_probe(dev, -ENODEV, "Unknown chip id 0x%02x\n", ret); aw99706_dt_parse(aw, &props); aw->hwen_gpio =3D devm_gpiod_get(aw->dev, "enable", GPIOD_OUT_LOW); ... } If the bootloader leaves the chip disabled, would this I2C read fail or time out because the enable GPIO is not fetched and asserted until later in the probe sequence? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260701133918.3348= 7-1-junjie.cao@linux.dev?part=3D2