lkml.org 
[lkml]   [2023]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf/x86/p4: Fix "Wunused-but-set-variable" warning
From
On Thu, Oct 12, 2023, Lucy Mielke wrote:
> Am Mon, Oct 09, 2023 at 09:29:50AM -0700 schrieb Sean Christopherson:
> >
> > rdmsr() writes to "high", but nothing ever reads from high. FWIW, I would _love_
> > for rdmsrl() to have return semantics, e.g. to be able to do:
> >
> > low = (u32)rdmsrl(MSR_IA32_MISC_ENABLE);
> >
> > or even
> >
> > if (!(rdmsrl(MSR_IA32_MISC_ENABLE) & BIT(7)))
>
> I have taken a look and it seems to me like this macro is called quite a lot
> for different things thoughout the kernel tree, including drivers. If
> one were to change it to have return semantics instead of the way it
> currently works, you'd have to change around 300 occurences, right?

Yep, which is the only reason I haven't force the issue.

\
 
 \ /
  Last update: 2023-10-13 18:26    [W:0.229 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site