From: Shuah Khan <skhan@linuxfoundation.org>
To: "Mateusz Jaśkiewicz" <jaskiewiczteo@gmail.com>,
"Thomas Renninger" <trenn@suse.com>,
"Shuah Khan" <shuah@kernel.org>,
"John B. Wyatt IV" <jwyatt@redhat.com>,
"John Kacur" <jkacur@redhat.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v3] cpupower: Implement powercap enabled setters
Date: Wed, 27 May 2026 09:26:39 -0600 [thread overview]
Message-ID: <5ff19049-a83a-4ef9-9cae-b97438fb3e77@linuxfoundation.org> (raw)
In-Reply-To: <20260527081233.4060762-1-jaskiewiczteo@gmail.com>
On 5/27/26 02:12, Mateusz Jaśkiewicz wrote:
> powercap_set_enabled() and powercap_zone_set_enabled() are part of the
> public libcpupower API, but both currently return success without
> updating sysfs.
>
> Write the requested value to the matching enabled attribute so callers
> can actually enable or disable the powercap control type or zone, and
> report write failures back to the caller.
>
> Signed-off-by: Mateusz Jaśkiewicz <jaskiewiczteo@gmail.com>
> ---
> Changes in v3:
> - Move the patch changelog below the Signed-off-by trailer so the
> sign-off is kept when the patch is applied.
>
> Changes in v2:
> - Check current enabled value before writing.
> - Use fd < 0 style for open() failures.
> - Print sysfs open/write failures with perror().
> - Drop the sizeof(path) typecast.
>
> tools/power/cpupower/lib/powercap.c | 58 +++++++++++++++++++++++------
> 1 file changed, 47 insertions(+), 11 deletions(-)
>
Something to fix here:
lib/powercap.c: In function ‘powercap_zone_set_enabled’:
lib/powercap.c:217:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
217 | if (ret < 0 || ret >= sizeof(path))
| ^~
thanks,
-- Shuah
next prev parent reply other threads:[~2026-05-27 15:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 22:35 [PATCH] cpupower: Implement powercap enabled setters Mateusz Jaśkiewicz
2026-05-11 21:01 ` Shuah Khan
2026-05-12 16:11 ` [PATCH v2] " Mateusz Jaśkiewicz
2026-05-14 21:28 ` Shuah Khan
2026-05-26 19:53 ` Shuah Khan
2026-05-27 8:12 ` [PATCH v3] " Mateusz Jaśkiewicz
2026-05-27 15:26 ` Shuah Khan [this message]
2026-05-28 15:32 ` [PATCH v4] " Mateusz Jaśkiewicz
2026-06-03 18:17 ` Shuah Khan
[not found] ` <CA+Z_OmTMGTib=eCEGNhCbd=7pmR8Zq7cResyRb=v_wWyRoEdfg@mail.gmail.com>
[not found] ` <e056d7f2-935f-4efd-bdef-d0f696026d7b@linuxfoundation.org>
[not found] ` <CA+Z_OmRN0bFXCxRg4SVNP-M0v6G2cME0HszPNyHhP5w7ti2Usw@mail.gmail.com>
2026-06-18 15:23 ` Shuah Khan
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=5ff19049-a83a-4ef9-9cae-b97438fb3e77@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=jaskiewiczteo@gmail.com \
--cc=jkacur@redhat.com \
--cc=jwyatt@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=trenn@suse.com \
/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