From: Ingo Molnar <mingo@kernel.org>
To: "Jürgen Groß" <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH 02/32] powercap: Stop using 32-bit MSR interfaces
Date: Mon, 29 Jun 2026 14:31:37 +0200 [thread overview]
Message-ID: <akJlqeg-G2P7PPgE@gmail.com> (raw)
In-Reply-To: <c4d745b9-fe6e-4290-9748-8d4d995df781@suse.com>
* Jürgen Groß <jgross@suse.com> wrote:
> On 29.06.26 13:25, Ingo Molnar wrote:
> >
> > * Juergen Gross <jgross@suse.com> wrote:
> >
> > > The 32-bit MSR interfaces rdmsr_safe() and wrmsr_safe() are planned to
> > > be removed. Use the related 64-bit variants instead.
> > >
> > > Drop a pointless initializer.
> >
> > Was the initializer really 'pointless'? IIRC it suppressed a build warning
> > on 32-bit builds, at least in some past iterations of these APIs.
>
> I don't see the connection to 32-bit builds. Either the uninitialized
> variable is a problem or not. And I don't see why "l" didn't need an initial
> value (it is modified in this function only via a "&=" operation, so some
> bits would still be random in case it is seen not to be set by rdmsr_safe()).
>
> In reality it should never be a problem, as rdmsr_safe() will always set both
> output variables to a value (0 in case of error, MSR contents else).
So it's not rdmsr_safe() but rdmsr(), but we had this:
10a5d65856b9 ("x86/process: Convert rdmsr() to rdmsrq() in arch_post_acpi_subsys_init() to address W=1 warning")
Which addressed this W=1 warning:
arch/x86/kernel/process.c: In function 'arch_post_acpi_subsys_init':
arch/x86/kernel/process.c:972:17: warning: variable 'hi' set but not used
By the pattern the 'pointless' hi=0 initialization looks similar
and may not be as pointless as it seems. :-)
Thanks,
Ingo
next prev parent reply other threads:[~2026-06-29 12:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 6:04 [PATCH 00/32] x86/msr: Drop 32-bit MSR interfaces Juergen Gross
2026-06-29 6:04 ` [PATCH 01/32] thermal/intel: Stop using " Juergen Gross
2026-06-29 6:04 ` [PATCH 02/32] powercap: " Juergen Gross
2026-06-29 11:25 ` Ingo Molnar
2026-06-29 11:33 ` Jürgen Groß
2026-06-29 12:31 ` Ingo Molnar [this message]
2026-06-29 12:52 ` Jürgen Groß
2026-06-29 6:04 ` [PATCH 04/32] acpi: " Juergen Gross
2026-06-29 6:05 ` [PATCH 16/32] cpufreq: " Juergen Gross
2026-06-29 14:55 ` Zhongqiu Han
2026-06-29 6:05 ` [PATCH 31/32] treewide: convert rdmsrq() from a macro to an inline function Juergen Gross
2026-06-29 6:52 ` [PATCH 00/32] x86/msr: Drop 32-bit MSR interfaces Arnd Bergmann
2026-06-29 7:01 ` Jürgen Groß
2026-06-29 8:06 ` Arnd Bergmann
2026-06-29 8:15 ` Jürgen Groß
2026-06-29 8:38 ` Arnd Bergmann
2026-06-29 11:19 ` Ingo Molnar
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=akJlqeg-G2P7PPgE@gmail.com \
--to=mingo@kernel.org \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/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