Skip to contentSkip to conversation

xen/cpufreq: Remove <asm/bug.h>

PATCH In review Jason Andryuk 3 participants 4 messages Mar 13, 2023 – Mar 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/cpufreq: Remove <asm/bug.h>

The header is unneeded - there are no uses of BUG() or WARN() in these cpufreq files. Remove the include. It is still include transitively from xen/lib.h.

---
 xen/arch/x86/acpi/cpufreq/cpufreq.c | 1 -
 xen/drivers/cpufreq/cpufreq.c       | 1 -
 2 files changed, 2 deletions(-)
xen/arch/x86/acpi/cpufreq/cpufreq.c +0 -1
index eedc7c737d..56816b1aee 100644
@@ -35,7 +35,6 @@
 #include <xen/sched.h>
 #include <xen/timer.h>
 #include <xen/xmalloc.h>
-#include <asm/bug.h>
 #include <asm/msr.h>
 #include <asm/io.h>
 #include <asm/processor.h>
xen/drivers/cpufreq/cpufreq.c +0 -1
index 6b2e81f1b0..9470eb7230 100644
@@ -39,7 +39,6 @@
 #include <xen/guest_access.h>
 #include <xen/domain.h>
 #include <xen/cpu.h>
-#include <asm/bug.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 
Signature · 1 line
2.39.2
#1 lore raw
Quoted 5 lines · Jason Andryuk

The header is unneeded - there are no uses of BUG() or WARN() in these cpufreq files. Remove the include. It is still include transitively from xen/lib.h.

This, in a way, is a review comment on Oleksii's "xen: change <asm/bug.h> to <xen/bug.h>". We can certainly put in the change as you have it (for him to drop the touching of the two files), but I'd find it more logical to continue to be part of his change, just with the xen/bug.h replacement includes dropped. Thoughts, either of you?

Things would be different if it was clear that the change here was dropping all unnecessary includes from the cpufreq files. But that doesn't look to be the case, as I think ...

xen/arch/x86/acpi/cpufreq/cpufreq.c line 39

Quoted 9 lines
xen/arch/x86/acpi/cpufreq/cpufreq.c +0 -1
@@ -35,7 +35,6 @@
 #include <xen/sched.h>
 #include <xen/timer.h>
 #include <xen/xmalloc.h>
-#include <asm/bug.h>
 #include <asm/msr.h>
 #include <asm/io.h>

... at least this one should be unnecessary as well, even more so ...

xen/drivers/cpufreq/cpufreq.c line 42

Quoted 8 lines
xen/drivers/cpufreq/cpufreq.c +0 -1
@@ -39,7 +39,6 @@
 #include <xen/guest_access.h>
 #include <xen/domain.h>
 #include <xen/cpu.h>
-#include <asm/bug.h>
 #include <asm/io.h>

... here.

Jan

#2 lore raw
Quoted 6 lines · Jan Beulich
Quoted 4 lines · Jason Andryuk

The header is unneeded - there are no uses of BUG() or WARN() in these cpufreq files. Remove the include. It is still include transitively from xen/lib.h.

Quoted 7 lines
Quoted 1 line

This, in a way, is a review comment on Oleksii's "xen: change <asm/bug.h> to <xen/bug.h>". We can certainly put in the change as you have it (for him to drop the touching of the two files), but I'd find it more logical to continue to be part of his change, just with the xen/bug.h replacement includes dropped. Thoughts, either of you?

Yes, Oleskii's work brought it to my attention. I submitted it this way to follow the "one change per commit" rule of thumb, seeing it as distinct from, though related to, the asm -> xen rename. If you prefer to have it rolled into Oleksii's change, that is fine by me.

Quoted 3 lines

Things would be different if it was clear that the change here was dropping all unnecessary includes from the cpufreq files. But that doesn't look to be the case, as I think ...

Correct, I did not inspect other includes.

Regards,
Jason

#3 lore raw
Quoted 22 lines · Jason Andryuk
Quoted 10 lines · Jan Beulich
Quoted 7 lines · Jason Andryuk

The header is unneeded - there are no uses of BUG() or WARN() in these
cpufreq files.  Remove the include.  It is still include transitively
from xen/lib.h.

Quoted 9 lines

This, in a way, is a review comment on Oleksii's "xen: change <asm/bug.h>
to <xen/bug.h>". We can certainly put in the change as you have it (for
him to drop the touching of the two files), but I'd find it more logical
to continue to be part of his change, just with the xen/bug.h replacement
includes dropped. Thoughts, either of you?

Quoted 4 lines

Yes, Oleskii's work brought it to my attention.  I submitted it this way to follow the "one change per commit" rule of thumb, seeing it as distinct from, though related to, the asm -> xen rename.  If you prefer to have it rolled into Oleksii's change, that is fine by me.

I think we can do it as a part of my changes to not produce additional commits with the similar meaning.

Quoted 11 lines
Quoted 6 lines

Things would be different if it was clear that the change here was dropping
all unnecessary includes from the cpufreq files. But that doesn't look to
be the case, as I think ...

Correct, I did not inspect other includes.

Regards,
Jason

~ Oleksii