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=1796365575; b=0XDI28tOKBYLeNzEx2FyicUkWKS/Nf4TcBoTIr1EuGl4XvlNNObBOuofCVJKkJ+RpvYE ZfGgs1lSAzp1KRCLXxHMrqup3yQxZiXs9RrdTHXFVSTHcQIdgxB6GoP2JGGAduts3A6lW l1awzzdHJfUKOTnNxiw8/Uc37SZuxYb4caiocCQ/9oNVutWa4PNY0lSjVIS9efb194O9U CJbHD2e+3kV6RBPAeqc7X/aqg1xN5b3XlQBJNfauZzfqpeH91x6Je79x4Xli73eEANgvm lQY8iFAhRzshhGge1YIUTsWt3f49Uqg09JHNb8jDV87uVcdxEj/iQJqmXtvIEUAqv7w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796365575; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=0EI/4p1gYcWrJh+6UmSWWisRcn6q0Z3D3rG9KGUJfus=; b=PzehEeGlzHWPOhw+qOSf+gQ51UuqijbTSCXFMsLC9PyVubC/Cyp4AjY4uujCMQIdGSSy gh0XfdgPm6pvGch5mD+R1CY/FiMeTyVCBxqBJeeqslGdhU48uosTeJHhj4krjdBMGaEOQ iKKLkPNvV74lqDS1aOAIMwiSZorn9sAHFktEgvp8i50fjk7lkDkJbd3YMYAxHnqPVfhyD 8pbfk13ZxJnGo1QK7wpsUEogT3730L0+ZnfJUA+oMBOAESKfDwU+q5a4y89TCfp2ncvR4 GzuQF5a2UfEDEtgdpjDlAlVj36QpbRrAOQIKAtBgj6vnhEJdNGa/CDO9VmvxxVbV4Nw== 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=LPZAHyED; 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 C4F5C606A32C; Fri, 4 Dec 2026 06:26:15 +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=LPZAHyED Received: by smtp.kernel.org (Postfix) with ESMTPSA id 207A91F000CE; Fri, 4 Dec 2026 06:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796365575; bh=0EI/4p1gYcWrJh+6UmSWWisRcn6q0Z3D3rG9KGUJfus=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=LPZAHyED8X+vzTsN6CLrnqr0Vv9ea314acyyACRqo+fhXr+5tRt64eHQv8JF96IwN OQ4BXFEqF0HRIqz8eXBR8+3S5UsdQXy+kd1yQ078fEMDIP48O4S7ERk6+68Pyfjb0c GzwqLb0gzySltG2sAONna3a+lviGLmqeDP44qLQSZxEsjEe0PRsfAbRtAqyOt7Hg05 NFqpFLAiFY7x+nWxLkw9Q6wDowl4ihjbz8sXvZBRhty80fwThsZimrASp+WW4RKQ1W k607jWnUQ9oshJhuZgcd4zSZK5hySRfZynQzKphTYInqzYTc/pPcNyJbRzrSqTb1lD xPcdix+ESmBOQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v8 3/4] mfd: aat2870: Convert to use OF bindings Reply-To: sashiko-reviews@lists.linux.dev To: "Svyatoslav Ryhel" Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, mfd@lists.linux.dev, dri-devel@lists.freedesktop.org, robh@kernel.org, conor+dt@kernel.org, lee@kernel.org In-Reply-To: <20261204060605.20688-4-clamor95@gmail.com> References: <20261204060605.20688-1-clamor95@gmail.com> <20261204060605.20688-4-clamor95@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 06:26:14 +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] mfd: aat2870: unchecked NULL of_node in aat2870_i2c_probe() - [Low] mfd: aat2870: unused MFD_CORE select and missing OF Kconfig dependency -- commit 8eae6697bf7acb1c55037a0723f2cae6756c9ef2 Author: Svyatoslav Ryhel mfd: aat2870: Convert to use OF bindings This commit converts the AAT2870 MFD core, regulator, and backlight drivers to use Device Tree bindings and gpiod helpers, removing platform data support and the MFD cell registration table. > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index c7ff8997beb15..889155282b82f 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -130,7 +130,6 @@ config MFD_AAT2870_CORE > select MFD_CORE > depends on I2C=3Dy > depends on GPIOLIB || COMPILE_TEST > - depends on GPIOLIB_LEGACY > help > If you say yes here you get support for the AAT2870. > This driver provides common support for accessing the device, [Severity: Low] Should MFD_AAT2870_CORE drop select MFD_CORE and add a dependency on OF (or OF || COMPILE_TEST)? The driver no longer uses the MFD core API after switching to devm_of_platform_populate(). Without CONFIG_OF_ADDRESS, devm_of_platform_populate() compiles to a stub that unconditionally returns -ENODEV, causing aat2870_i2c_probe() to always fail. > diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c > index 5d43fd1da96e9..f5409dd91efb3 100644 > --- a/drivers/mfd/aat2870-core.c > +++ b/drivers/mfd/aat2870-core.c [ ... ] > @@ -347,60 +307,27 @@ static int aat2870_i2c_probe(struct i2c_client *cli= ent) [ ... ] > + ret =3D devm_of_platform_populate(&client->dev); > + if (ret) { > + gpiod_set_value_cansleep(aat2870->en_pin, 0); > + return dev_err_probe(&client->dev, ret, "Failed to populate cells\n"); > } [Severity: Medium] Can this populate the root Device Tree node and leak child devices if client->dev.of_node is NULL? Because aat2870_i2c_driver retains .id_table, an I2C client can still bind without a Device Tree node (for example via sysfs new_device). When root is NULL, of_platform_populate() falls back to of_find_node_by_path("/") and populates top-level DT nodes under &client->dev. On unbind, of_platform_depopulate() skips cleanup when parent->of_node is NULL, leaking any devices populated during probe. Dropping .id_table or returning an error when client->dev.of_node is NULL would prevent this. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204060605.2068= 8-1-clamor95@gmail.com?part=3D3