From: sashiko-bot@kernel.org
To: "Aditya Garg" <aditya.garg@linux.dev>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (macsmc) Allow enable writing to fan speeds by modifying sysfs
Date: Sun, 18 Oct 2026 11:37:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-176085@kernel.org> (raw)
In-Reply-To: <20261018113248.12243-1-aditya.garg@linux.dev>
> The fan_control module parameter in the driver enables/disables the user's
> ability to manually modify the fan speeds. In case the user attempts to
> change the module parameter via sysfs rather than at the time of modprobe,
> changing fan speeds is still restricted.
>
> The reason behind this is because during probe the fan_control variable is
> used to restrict the user in the following two ways:
>
> 1. if (!fan_control || hwmon->fan.fans[channel].mode.macsmc_key == 0)
> return -EOPNOTSUPP;
>
> Here, if disabled, the OS will return an error and will not allow changing
> the speeds.
>
> 2. if (fan->attrs & BIT(attr)) {
> [ ... ]
> this patch removes the second check. Now, if the module parameter is changed
> via sysfs, the first check will pass and user will be able to modify the fan
> speeds.
>
> Signed-off-by: Aditya Garg <aditya.garg@linux.dev>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261018113248.12243-1-aditya.garg@linux.dev?part=1
prev parent reply other threads:[~2026-10-18 11:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 11:32 [PATCH] hwmon: (macsmc) Allow enable writing to fan speeds by modifying sysfs Aditya Garg
2026-10-18 11:37 ` sashiko-bot [this message]
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=sashiko-outbox-176085@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aditya.garg@linux.dev \
--cc=linux-hwmon@vger.kernel.org \
--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