From: sashiko-bot@kernel.org
To: "Kean Ren" <rh_king@163.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 1/2] hwmon: (lenovo-ec-sensors): Convert to devm_request_region()
Date: Wed, 20 May 2026 02:51:30 +0000 [thread overview]
Message-ID: <20260520025130.DB45A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260520022946.17335-2-rh_king@163.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message inaccurately claims to remove five `release_region()` calls and drop unnecessary braces, but only four calls were removed and the braces were left intact.
--
commit e8c1e48be4d237988380d2577325024d4865618f
Author: Kean Ren <rh_king@163.com>
hwmon: (lenovo-ec-sensors): Convert to devm_request_region()
This commit replaces manual request_region() and release_region() calls
with devm_request_region() to allow the device-managed framework to
handle the I/O region lifetime automatically.
> Remove all five manual release_region() calls that are now handled
> automatically, and drop the unnecessary braces on the single-statement
> blocks that previously contained them.
[Severity: Medium]
Is this description accurate? The patch diff shows that only four
release_region() calls were removed.
> diff --git a/drivers/hwmon/lenovo-ec-sensors.c b/drivers/hwmon/lenovo-ec-sensors.c
> index 8681bbf6665b1..45db49e189d3d 100644
> --- a/drivers/hwmon/lenovo-ec-sensors.c
> +++ b/drivers/hwmon/lenovo-ec-sensors.c
> @@ -541,7 +541,6 @@ static int lenovo_ec_probe(struct platform_device *pdev)
> (inb_p(MCHP_EMI0_EC_DATA_BYTE1) != 'C') &&
> (inb_p(MCHP_EMI0_EC_DATA_BYTE2) != 'H') &&
> (inb_p(MCHP_EMI0_EC_DATA_BYTE3) != 'P')) {
> - release_region(IO_REGION_START, IO_REGION_LENGTH);
> return -ENODEV;
> }
[Severity: Medium]
This isn't a bug, but could these curly braces be removed? The commit
message mentions dropping the unnecessary braces on the single-statement
blocks, but they appear to have been left intact here.
[ ... ]
> @@ -607,7 +605,6 @@ static int __init lenovo_ec_init(void)
> lenovo_ec_probe, NULL, 0, NULL, 0);
>
> if (IS_ERR(lenovo_ec_sensors_platform_device)) {
> - release_region(IO_REGION_START, IO_REGION_LENGTH);
> return PTR_ERR(lenovo_ec_sensors_platform_device);
> }
[Severity: Medium]
Could the braces be removed from this block as well, to match the
description in the commit message?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260514011411.4167069-1-rh_king@163.com?part=1
next prev parent reply other threads:[~2026-05-20 2:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 1:14 [PATCH 0/3] hwmon: lenovo-ec-sensors: Probe error handling fixes Kean
2026-05-14 1:14 ` [PATCH 1/3] hwmon: lenovo-ec-sensors: Fix EC signature check logic in probe Kean
2026-05-14 1:37 ` Guenter Roeck
2026-05-14 2:40 ` Mark Pearson
2026-05-14 1:14 ` [PATCH 2/3] hwmon: lenovo-ec-sensors: Fix NULL pointer dereference when DMI match fails Kean
2026-05-14 1:29 ` Guenter Roeck
2026-05-14 3:25 ` Guenter Roeck
2026-05-15 8:10 ` Kean
2026-05-15 8:48 ` Guenter Roeck
2026-05-15 8:30 ` Kean
2026-05-14 11:57 ` sashiko-bot
2026-05-14 1:14 ` [PATCH 3/3] hwmon: lenovo-ec-sensors: Use devm_request_region for automatic cleanup Kean
2026-05-14 1:36 ` Guenter Roeck
2026-05-14 2:39 ` Mark Pearson
2026-05-14 3:24 ` Guenter Roeck
2026-05-14 12:19 ` sashiko-bot
2026-05-20 2:29 ` [PATCH v2 0/2] hwmon: (lenovo-ec-sensors): Fix EC signature validation and I/O resource management Kean Ren
2026-05-20 2:29 ` [PATCH v2 1/2] hwmon: (lenovo-ec-sensors): Convert to devm_request_region() Kean Ren
2026-05-20 2:51 ` sashiko-bot [this message]
2026-05-20 5:03 ` Guenter Roeck
2026-05-20 5:52 ` [PATCH 2/3] hwmon: lenovo-ec-sensors: Fix NULL pointer dereference when DMI match fails Kean Ren
2026-05-20 13:11 ` Guenter Roeck
2026-05-20 2:32 ` [PATCH v2 2/2] hwmon: (lenovo-ec-sensors): Fix EC "MCHP" signature validation logic Kean Ren
2026-05-20 3:09 ` sashiko-bot
2026-05-21 3:52 ` [PATCH v3 0/2] hwmon: (lenovo-ec-sensors): Fix EC signature validation and I/O resource management Kean Ren
2026-05-21 3:52 ` [PATCH v3 1/2] hwmon: (lenovo-ec-sensors): Convert to devm_request_region() Kean Ren
2026-05-21 4:19 ` sashiko-bot
2026-05-21 13:45 ` Guenter Roeck
2026-05-21 3:52 ` [PATCH v3 2/2] hwmon: (lenovo-ec-sensors): Fix EC "MCHP" signature validation logic Kean Ren
2026-05-21 4:45 ` sashiko-bot
2026-05-21 13:46 ` Guenter Roeck
2026-05-22 1:33 ` 任海
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260520025130.DB45A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=rh_king@163.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox