cpufreq: amd-pstate: cleanup the unused and duplicated headers declaration
Subsystems (2)
Perry Yuan
reviewerPATCH v6 1/1 cpufreq: amd-pstate: cleanup the unused and duplicated headers declaration
Cleanup the headers declaration which are not used actually and some duplicated declaration which is declarated in some other headers already, it will help to simplify the header part.
--- drivers/cpufreq/amd-pstate.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/cpufreq/amd-pstate.c +0 -4
@@ -31,19 +31,15 @@#include <linux/compiler.h> #include <linux/dmi.h> #include <linux/slab.h> -#include <linux/acpi.h> #include <linux/io.h> #include <linux/delay.h> #include <linux/uaccess.h> #include <linux/static_call.h> -#include <acpi/processor.h> #include <acpi/cppc_acpi.h> #include <asm/msr.h> #include <asm/processor.h> -#include <asm/cpufeature.h> -#include <asm/cpu_device_id.h> #include "amd-pstate-trace.h" #define AMD_PSTATE_TRANSITION_LATENCY 0x20000
Signature · 1 line
2.34.1
Viresh Kumar
maintainerQuoted 2 lines · Perry Yuan
Cleanup the headers declaration which are not used actually and
This is okay.
Quoted 2 lines
some duplicated declaration which is declarated in some other headers already, it will help to simplify the header part.
This isn't.
Every file should directly include headers they use definitions from, instead of relying on indirect inclusions.
Signature · 1 line
viresh
Yuan, Perry
reviewer[AMD Official Use Only - General]
Hi Viresh,
Quoted 15 lines
-----Original Message-----
From: Viresh Kumar <[email protected]>
Sent: Thursday, September 1, 2022 2:32 PM
To: Yuan, Perry <[email protected]>
Cc: [email protected]; Huang, Ray <[email protected]>; Sharma, Deepak <[email protected]>; Limonciello, Mario <[email protected]>; Fontenot, Nathan <[email protected]>; Deucher, Alexander <[email protected]>; Su, Jinzhou (Joe) <[email protected]>; Huang, Shimmer <[email protected]>; Du, Xiaojian <[email protected]>; Meng, Li (Jassmine) <[email protected]>; linux- [email protected]; [email protected]
Subject: Re: [PATCH v6] cpufreq: amd-pstate: cleanup the unused and duplicated headers declaration
Quoted 6 lines
[CAUTION: External Email]
Quoted 1 line · Perry Yuan
Cleanup the headers declaration which are not used actually and
This is okay.
Thank you help to confirm this .
Quoted 11 lines
Quoted 3 lines
some duplicated declaration which is declarated in some other headers already, it will help to simplify the header part.
This isn't.
Every file should directly include headers they use definitions from, instead of relying on indirect inclusions.
--
Viresh
Do I need to update the commit with another V7 version ? If need, I will update this later.
Thank you.
Perry.
Viresh Kumar
maintainerQuoted 13 lines · Perry
Quoted 4 lines · Perry Yuan
Quoted 1 line
Cleanup the headers declaration which are not used actually and
This is okay.
Thank you help to confirm this .
Quoted 6 lines
Quoted 3 lines
some duplicated declaration which is declarated in some other headers already, it will help to simplify the header part.
This isn't.
Quoted 7 lines
Quoted 5 lines
Every file should directly include headers they use definitions from, instead of relying on indirect inclusions.
--
VireshDo I need to update the commit with another V7 version ?
I am not sure which headers you removed are still required, working for now since included indirectly. If there are any, then better to get a new version out.
Signature · 1 line
viresh
Hi Perry,
Quoted 25 lines · Perry Yuan
Cleanup the headers declaration which are not used actually and some duplicated declaration which is declarated in some other headers already, it will help to simplify the header part.
Reviewed-by Huang Rui <[email protected]>Acked-by Viresh Kumar <[email protected]>Signed-off-by Perry Yuan <[email protected]>--- drivers/cpufreq/amd-pstate.c | 4 ---- 1 file changed, 4 deletions(-)drivers/cpufreq/amd-pstate.c +0
-1@@ -31,19 +31,15 @@#include <linux/compiler.h> #include <linux/dmi.h> #include <linux/slab.h> -#include <linux/acpi.h> #include <linux/io.h> #include <linux/delay.h> #include <linux/uaccess.h> #include <linux/static_call.h>
drivers/cpufreq/amd-pstate.c line 45
Quoted 10 lines
drivers/cpufreq/amd-pstate.c +0
-3-#include <acpi/processor.h> #include <acpi/cppc_acpi.h> #include <asm/msr.h> #include <asm/processor.h> -#include <asm/cpufeature.h> -#include <asm/cpu_device_id.h> #include "amd-pstate-trace.h" #define AMD_PSTATE_TRANSITION_LATENCY 0x20000
The patch has the same issue as mentioned in the previous version.
Please don't remove any header includes whose definitions are directly used in amd-pstate.c. Look at example from my previous comment.