Re: [PATCH v2 8/8] x86/msr: Remove duplicate #include

2026-04-30 Thread Jürgen Groß

On 30.04.26 19:42, Dave Hansen wrote:

On 4/30/26 00:20, Jürgen Groß wrote:

On 29.04.26 20:45, Dave Hansen wrote:

From: Dave Hansen 

errno.h is already included for C code at the top of the header.


I'm seeing only asm/errno.h being included.

I don't say linux/errno.h is needed, but the reasoning is not really
convincing.


Yes, completely agree. I goofed that one was linux/errno.h and the other
was asm/errno.h. So the reasoning was bogus. But I do think it's still a
good idea for other reasons. How about:

linux/errno.h was presumably being included here for some of
the MSR function implementations inside the #fidef. But, even
before those were moved out of the #ifdef, they were not using
anything from errno.h. There does not appear to be any reason to
include it here. Especially inside the (quite small now) #ifdef.

Remove the #include.

?



Fine with me.


Juergen


OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: [PATCH v2 8/8] x86/msr: Remove duplicate #include

2026-04-30 Thread Dave Hansen
On 4/30/26 00:20, Jürgen Groß wrote:
> On 29.04.26 20:45, Dave Hansen wrote:
>> From: Dave Hansen 
>>
>> errno.h is already included for C code at the top of the header.
> 
> I'm seeing only asm/errno.h being included.
> 
> I don't say linux/errno.h is needed, but the reasoning is not really
> convincing.

Yes, completely agree. I goofed that one was linux/errno.h and the other
was asm/errno.h. So the reasoning was bogus. But I do think it's still a
good idea for other reasons. How about:

linux/errno.h was presumably being included here for some of
the MSR function implementations inside the #fidef. But, even
before those were moved out of the #ifdef, they were not using
anything from errno.h. There does not appear to be any reason to
include it here. Especially inside the (quite small now) #ifdef.

Remove the #include.

?




Re: [PATCH v2 8/8] x86/msr: Remove duplicate #include

2026-04-30 Thread Jürgen Groß

On 29.04.26 20:45, Dave Hansen wrote:

From: Dave Hansen 

errno.h is already included for C code at the top of the header.


I'm seeing only asm/errno.h being included.

I don't say linux/errno.h is needed, but the reasoning is not really
convincing.


Juergen


Zap the duplicate.

Signed-off-by: Dave Hansen 
---

  b/arch/x86/include/asm/msr.h |1 -
  1 file changed, 1 deletion(-)

diff -puN arch/x86/include/asm/msr.h~rdmsr-dups-11 arch/x86/include/asm/msr.h
--- a/arch/x86/include/asm/msr.h~rdmsr-dups-11  2026-04-29 11:38:57.838732405 
-0700
+++ b/arch/x86/include/asm/msr.h2026-04-29 11:38:57.841732519 -0700
@@ -172,7 +172,6 @@ static inline u64 native_read_pmc(int co
  #ifdef CONFIG_PARAVIRT_XXL
  #include 
  #else
-#include 
  
  /* Short-circuit the paravirt MSR infrastructure when it is disabled: */

  #define paravirt_read_msr native_read_msr
_




OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature