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=1796314825; b=3qaYDIhK3NQUjPcDchAJbFqvc+g1sq8RJmUa8NnRC5cmJhZwS1NSonNmJOUZOnwFr68i OdOatM4nvl+l3LvCH42y3Wj7W2mCy/c6qH0Wo+k1X+cSsi+wwG/LzA7NoDG9uupPeoYJ3 STdvlm9syDyjSmMtKe3SV9ZVMF8j7oovEeaLlA/wNXQ/iMBTjjRa6eFZxnhrkPHe3v1m/ 6ZWb2oISEsX6r6G7hF//lYlEPiLvHqB2yXV6J/2pgiSYgUYzVJHdZCserNEu7cbz+XQxb Aghu276Lc/fu0gJrtpDaSmT8gH+mZFMFudW+91i9zANOjQUKjSCxzfawdG7c8ri5x7A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796314825; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=ER32a0GjtapdNEBVhK0jqBeE92tcnk4R1Egw6SPKqlk=; b=MP5fYQBN6upy6gyCLcM+yAJ+QlP32Xjk3YHCfsVMZ68+n06gglKRAZZ7FyQ4xvY3eqfC TVPBxgIPvoNjZ0Qzcz+fZolOZMxwZ4PFOrcw2+DDHRvrmRGKGBEPudeVLC6wqqOMAFOb7 z7g9D8LXjhFdPxuSvW+73B8bzK2+99UEDnU96o3B6CzO9pXXS0pWqPhlNySfEDB1p+s9c lXGCkuON/uiiDRGOocZTvCsTyxat+qfQ98KBEc4YK1CdpPCmA02Kwyk/NOvicr7f5v8Y3 ++aR6i9g4Yt6DsX927CKV7yob9/opvEc6d19+cgRn4kHCQt0y3Y8zkKpAb3JGciqcEA== 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=lJkbBAZl; 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 C3B13606A322; Thu, 3 Dec 2026 16:20:25 +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=lJkbBAZl Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1ECA71F00893; Thu, 3 Dec 2026 16:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796314825; bh=ER32a0GjtapdNEBVhK0jqBeE92tcnk4R1Egw6SPKqlk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=lJkbBAZlMS0Q3q8yWIuH1SsVsCFj/XQkmPD6QWI0SWzFLSdgnawUoysJ/pigtgOsw x/NrYFmYlgzTRqBKUFiZYdwnXL9UbMiNqSxvxlHQfMJT4WcsiwlAsH039zwuzocDvs iUTX9rzmOqtHzqwjNgfrxsx52+cymX7NnrQUB1at3eRw3/MR4dAMLcgt74QNhJpgjh Xexx5f667s3+AgqLT/+0wytkAX0XRciQCwAKMec9oWK7mVV+RLCdiYsXwTx3kzffM8 zw7OIkSCrCcCGFqx3ngekFXIdDuHhiHVIfztR9LZW6jdx8mfg5OoE639RM5OW8GWoA GMY5MMd5P0Edg== Date: Thu, 3 Dec 2026 16:20:21 +0000 From: Lee Jones To: Svyatoslav Ryhel Cc: sashiko-reviews@lists.linux.dev, devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org, conor+dt@kernel.org Subject: Re: [PATCH v6 4/5] mfd: max8907: Convert to use device managed poweroff handler Message-ID: <20261203162021.GM98551@kernel.org> References: <20261123150224.199601-1-clamor95@gmail.com> <20261123150224.199601-5-clamor95@gmail.com> <20261202164246.GN43081@kernel.org> <20261202201427.GG98551@kernel.org> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, 03 Dec 2026, Svyatoslav Ryhel wrote: > ср, 2 груд. 2026 р. о 22:14 Lee Jones пише: > > > > On Wed, 02 Dec 2026, Svyatoslav Ryhel wrote: > > > > > ср, 2 груд. 2026 р. о 18:42 Lee Jones пише: > > > > > > > > On Mon, 23 Nov 2026, sashiko-bot@kernel.org wrote: > > > > > > > > > Thank you for your contribution! Sashiko AI review found 1 potential > > > > > issue to consider: > > > > > - [Medium] mfd: max8907: max8907_i2c_probe() drops > > > > > maxim,system-power-controller check > > > > > -- > > > > > > > > > > commit b8bc64d186feb8ec318721e193d4a0bf70c6eebf > > > > > Author: Svyatoslav Ryhel > > > > > > > > > > mfd: max8907: Convert to use device managed poweroff handler > > > > > > > > > > This commit replaces devm_register_sys_off_handler() with > > > > > devm_register_power_off_handler() and switches the DT check from > > > > > maxim,system-power-controller to of_device_is_system_power_controller(). > > > > > > > > > > > diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c > > > > > > index f1cabb666d8ed..5d17971a8e9ab 100644 > > > > > > --- a/drivers/mfd/max8907.c > > > > > > +++ b/drivers/mfd/max8907.c > > > > > > @@ -189,8 +189,6 @@ static int max8907_i2c_probe(struct i2c_client *i2c) > > > > > > struct device *dev = &i2c->dev; > > > > > > struct max8907 *max8907; > > > > > > int ret; > > > > > > - bool pm_off = of_property_read_bool(dev->of_node, > > > > > > - "maxim,system-power-controller"); > > > > > > > > > > > > max8907 = devm_kzalloc_obj(dev, struct max8907); > > > > > > if (!max8907) > > > > > > @@ -241,12 +239,10 @@ static int max8907_i2c_probe(struct i2c_client *i2c) > > > > > > if (ret) > > > > > > return dev_err_probe(dev, ret, "Failed to add MFD devices\n"); > > > > > > > > > > > > - if (pm_off) { > > > > > > - ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_POWER_OFF, > > > > > > - SYS_OFF_PRIO_DEFAULT, > > > > > > - max8907_power_off, max8907); > > > > > > + if (of_device_is_system_power_controller(dev->of_node)) { > > > > > > + ret = devm_register_power_off_handler(dev, max8907_power_off, max8907); > > > > > > if (ret) > > > > > > - return dev_err_probe(dev, ret, "failed to register sys-off handler\n"); > > > > > > + return dev_err_probe(dev, ret, "failed to register power-off handler\n"); > > > > > > } > > > > > > > > > > > > return 0; > > > > > > > > > > [Severity: Medium] > > > > > Should max8907_i2c_probe() continue checking the legacy > > > > > maxim,system-power-controller property as a fallback alongside > > > > > of_device_is_system_power_controller()? > > > > > > > > > > of_device_is_system_power_controller() only checks the standard > > > > > system-power-controller property. In commit "regulator: dt-bindings: > > > > > maxim,max8907: Convert to DT schema" earlier in this series, > > > > > Documentation/devicetree/bindings/regulator/maxim,max8907.yaml keeps > > > > > maxim,system-power-controller as a deprecated property rather than > > > > > removing it, and commit "mfd: max8907: Remove platform_data based probing" > > > > > notes that external DTBs may exist. On a board booting with an existing > > > > > DTB that uses maxim,system-power-controller, max8907_i2c_probe() will now > > > > > skip registering the power-off handler, leaving the system unable to power > > > > > off via the PMIC. > > > > > > > > Do I assume that your silence means that you do not agree? > > > > > > > > I usually like submitters to at least acknowledge the warning. > > > > > > > > > > Literally in the commit message: > > > > > > "There are no in-kernel users of maxim,system-power-controller property and > > > all new users will use generic system-power-controller so check for the > > > legacy property can be removed." > > > > Interesting that Sashiko didn't pick that up. > > > > "Based on manual sampling of Linux kernel reviews, the false-positive > rate is under 20% (mostly gray-area concerns). As with any LLM-based > tool, Sashiko's output is probabilistic and may vary across runs on > the same input." > > Even being quite useful, everyone using Sashiko still should take its > reviews with a grain of dubiety. Agree. However, with the torrent of new patches coming through for maintainers to wade through, defending patches must remain with the contributor. -- Lee Jones