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=1796345203; b=N3Cl7KyyPGE6OgPTP/p4cduxF5I+ZIYfyL6CSkKotg53YmzfOSsfFhBv61r1wEKOoy0j IjztL1ndgAu5XASOUA1NBdAkwlAh2pWjAipn0xv0qoJ/0ySGFPzkbe8TnaogklVp0qhS/ SNM7gICWPBdebh7ULX/hjWUdR9PWydRoZn1uja2cMgD9S2hsdlHWcAE6eeEjwIVQXUK+L 7Hw7TVJ0usMqU0NyzQdRDeZcDVogPgICf4kpsKw78YEkLGKQQQ13bfk2+IvRV8gCEmXz6 UCtaEejAos36VU3+CQ4CHLZ2Tt9I5gNzlHodvYFq2jyjrAWNxfdwehky1RAyHOTl3Tg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796345203; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=OuLiS/n1JegppYpBdznPbpr9mZKU+AkJKku6VW+RZQM=; b=R64L7Va0hGVUcg1WYhInvKcu1H+GV9375+40ci60icD1UYVU9koFdtjgV6ufjXj7PRGP pTIhLH/e5euKUMSHmzJC+k6r+41Rwea8X3tZSgRJtochfXYFtjI3Fn+KjYGDUOL6GekJQ 1toEPtvPMfD6+U7i2zZh+nLlaujmEQPpm96PCyZpV8Zfhfee9skchCSCggP58m80E6o40 CX6Czpmu9gPbxZLLm161CI+Z7HCXn6L73TD0Pu6nHIR1PFtOZZKBCYW8vXuMA1F9SUc8V 6/Xis/O1fch3OGqkm+Pj0Qa/LMGhXnLhja8BVplHKf9pMrmLW5BZUtq1pA6+5b06kcw== 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=hhJhlnNu; 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 1230A606A322; Fri, 4 Dec 2026 00:46:42 +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=hhJhlnNu Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F8511F000C2; Fri, 4 Dec 2026 00:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796345202; bh=OuLiS/n1JegppYpBdznPbpr9mZKU+AkJKku6VW+RZQM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=hhJhlnNu7ztWixA1Hh7Haj3Xjqrwtz3wci9XOoQEQwru9slUm0XSR0LLehkfhuiO5 cuIZXBQnEFO5ciXXl4CzsHaV3Sdx/3IjYKdum500U2AXJwBmeZMMzfqM4BaPJhvj/D MosRJ25ez8SjbMUSvVX5eXV2AvMJwsPwezENTrel+5Z12M23g5LkSUZkpDT9yUqrng jpwVUaJTkqbY0H7fK8v/KfVoGmtL5no+i53SV7Gntwtq3iixV2duLVvNGchKLhskDz fOFc63fPidL5k8ZeHT46jI1/uNn+vRKT4U9T6sgsFDFWAgFyrva6gyUGNNAyjfvPP2 xTqmF1pzAd9vA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 3/3] leds: rgb: lp5860: Add I2C interface support Reply-To: sashiko-reviews@lists.linux.dev To: "Peter LaDow" Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, lee@kernel.org In-Reply-To: <20261203-add-i2c-support-for-lp5860-v4-3-dd84962336b1@gmail.com> References: <20261203-add-i2c-support-for-lp5860-v4-0-dd84962336b1@gmail.com> <20261203-add-i2c-support-for-lp5860-v4-3-dd84962336b1@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 00:46:42 +0000 X-Mailing-List: linux-leds@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 2 potential issues to consider: - [Medium] leds: lp5860: lp5860_iterate_subleds() returns 0 on out-of-range channel - [Low] leds: lp5860: undocumented core bounds-check fixes bundled in I2C commit -- commit c30d7cd0ea8cc80600add2467fdd412378cb0465 Author: Peter LaDow > leds: rgb: lp5860: Add I2C interface support > > The Texas Instruments LP5860 RGB LED matrix driver supports both SPI and > I2C communication buses depending on the IFS pin state, but the > existing driver only implements the SPI bus interface. > > Add an I2C bus front-end driver (leds-lp5860-i2c) that reserves the > four consecutive 7-bit I2C addresses used by the LP5860 to map its > 10-bit register space across dummy I2C clients, initializes a custom > regmap, and delegates device setup to lp5860_device_init(). Update > Kconfig and Makefile so I2C and SPI support can be built independently > or together. > > Tested on ZynqMP (ZU3) with an LP5860 connected over an AXI IIC at > base address 0x40 (A1=3D0, A0=3D0) at 400 kHz. > > Signed-off-by: Peter LaDow [Severity: Low] Should the off-by-one bounds-check fixes in leds-lp5860-core.c be split into a separate commit, or at least described in the commit message? The commit message only describes the new I2C driver, while the diff also fixes off-by-one checks in lp5860_set_dot_onoff() and lp5860_iterate_subled= s() from f0a66563aa2d ("leds: Add support for TI LP5860 LED driver chip"). Splitting them out lets the SPI driver take the fix with a Fixes: tag. [ ... ] > diff --git a/drivers/leds/rgb/leds-lp5860-core.c b/drivers/leds/rgb/leds-= lp5860-core.c > index 84eb4635dafba..132ada3ea4b9f 100644 > --- a/drivers/leds/rgb/leds-lp5860-core.c > +++ b/drivers/leds/rgb/leds-lp5860-core.c [ ... ] > @@ -115,7 +115,7 @@ static int lp5860_iterate_subleds(struct lp5860_led *= led, struct led_init_data * > } > =20 > ret =3D fwnode_property_read_u32(led_node, "reg", &channel); > - if (ret < 0 || channel > LP5860_MAX_LED) { > + if (ret < 0 || channel >=3D LP5860_MAX_LED) { > dev_err_probe(led->chip->dev, ret, > "%pfwP: 'reg' property is missing. Skipping.\n", led_node); > fwnode_handle_put(led_node); [Severity: Medium] Does lp5860_iterate_subleds() return 0 when channel >=3D LP5860_MAX_LED? When fwnode_property_read_u32() succeeds with an out-of-range reg value such as 198, ret is 0. This branch logs error 0 via dev_err_probe() and returns ret (0) instead of -EINVAL. Because lp5860_init_dt() only skips the node on a non-zero return, it proce= eds to call lp5860_set_mc_brightness() with the remaining zero-initialized subled_info entries (driving hardware channel 0) and registers a partially initialized multicolor LED. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-add-i2c-su= pport-for-lp5860-v4-0-dd84962336b1@gmail.com?part=3D3