[v4,18/53] power: remove unneeded header includes

Message ID 20220114162409.334437-19-sean.morrissey@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series introduce IWYU |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sean Morrissey Jan. 14, 2022, 4:23 p.m. UTC
These header includes have been flagged by the iwyu_tool
and removed. Also added rte_string_fns.h to example app
vm_power_manager for users without libbsd.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
---
 examples/vm_power_manager/guest_cli/main.c | 1 +
 lib/power/guest_channel.c                  | 2 --
 lib/power/power_acpi_cpufreq.c             | 7 -------
 lib/power/power_acpi_cpufreq.h             | 4 ----
 lib/power/power_common.h                   | 1 -
 lib/power/power_cppc_cpufreq.c             | 1 -
 lib/power/power_cppc_cpufreq.h             | 4 ----
 lib/power/power_kvm_vm.c                   | 1 -
 lib/power/power_kvm_vm.h                   | 4 ----
 lib/power/power_pstate_cpufreq.c           | 7 -------
 lib/power/power_pstate_cpufreq.h           | 4 ----
 lib/power/rte_power.c                      | 1 -
 lib/power/rte_power.h                      | 2 --
 lib/power/rte_power_empty_poll.c           | 2 --
 14 files changed, 1 insertion(+), 40 deletions(-)
  

Patch

diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index b8fa65ef15..9da50020ac 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -13,6 +13,7 @@ 
 #include <rte_debug.h>
 #include <rte_eal.h>
 #include <rte_log.h>
+#include <rte_string_fns.h>
 
 #include "vm_power_cli_guest.h"
 #include "parse.h"
diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c
index 474dd92998..969a9e5aaa 100644
--- a/lib/power/guest_channel.c
+++ b/lib/power/guest_channel.c
@@ -4,9 +4,7 @@ 
 
 #include <glob.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
-#include <signal.h>
 #include <limits.h>
 #include <fcntl.h>
 #include <string.h>
diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c
index 402ed8c99b..6e57aca535 100644
--- a/lib/power/power_acpi_cpufreq.c
+++ b/lib/power/power_acpi_cpufreq.c
@@ -3,17 +3,10 @@ 
  */
 
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <signal.h>
-#include <limits.h>
 
 #include <rte_memcpy.h>
-#include <rte_memory.h>
 #include <rte_string_fns.h>
 
 #include "power_acpi_cpufreq.h"
diff --git a/lib/power/power_acpi_cpufreq.h b/lib/power/power_acpi_cpufreq.h
index 41675b9cd9..682fd9278c 100644
--- a/lib/power/power_acpi_cpufreq.h
+++ b/lib/power/power_acpi_cpufreq.h
@@ -10,10 +10,6 @@ 
  * RTE Power Management via userspace ACPI cpufreq
  */
 
-#include <rte_common.h>
-#include <rte_byteorder.h>
-#include <rte_log.h>
-#include <rte_string_fns.h>
 #include "rte_power.h"
 
 /**
diff --git a/lib/power/power_common.h b/lib/power/power_common.h
index 0b264edfa5..c1c7139276 100644
--- a/lib/power/power_common.h
+++ b/lib/power/power_common.h
@@ -5,7 +5,6 @@ 
 #ifndef _POWER_COMMON_H_
 #define _POWER_COMMON_H_
 
-#include <inttypes.h>
 
 #include <rte_common.h>
 
diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index 25185a791c..ef06fbcd9e 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -4,7 +4,6 @@ 
  */
 
 #include <rte_memcpy.h>
-#include <rte_memory.h>
 
 #include "power_cppc_cpufreq.h"
 #include "power_common.h"
diff --git a/lib/power/power_cppc_cpufreq.h b/lib/power/power_cppc_cpufreq.h
index 4e73c91b05..f4121b237e 100644
--- a/lib/power/power_cppc_cpufreq.h
+++ b/lib/power/power_cppc_cpufreq.h
@@ -11,10 +11,6 @@ 
  * RTE Power Management via userspace CPPC cpufreq
  */
 
-#include <rte_common.h>
-#include <rte_byteorder.h>
-#include <rte_log.h>
-#include <rte_string_fns.h>
 #include "rte_power.h"
 
 /**
diff --git a/lib/power/power_kvm_vm.c b/lib/power/power_kvm_vm.c
index ab7d4b8cee..6a8109d449 100644
--- a/lib/power/power_kvm_vm.c
+++ b/lib/power/power_kvm_vm.c
@@ -9,7 +9,6 @@ 
 #include "rte_power_guest_channel.h"
 #include "guest_channel.h"
 #include "power_kvm_vm.h"
-#include "power_common.h"
 
 #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent"
 
diff --git a/lib/power/power_kvm_vm.h b/lib/power/power_kvm_vm.h
index 9a309a300f..303fcc041b 100644
--- a/lib/power/power_kvm_vm.h
+++ b/lib/power/power_kvm_vm.h
@@ -10,10 +10,6 @@ 
  * RTE Power Management KVM VM
  */
 
-#include <rte_common.h>
-#include <rte_byteorder.h>
-#include <rte_log.h>
-#include <rte_string_fns.h>
 #include "rte_power.h"
 
 /**
diff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c
index 86f8a76e46..959eccffd8 100644
--- a/lib/power/power_pstate_cpufreq.c
+++ b/lib/power/power_pstate_cpufreq.c
@@ -3,20 +3,13 @@ 
  */
 
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
-#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <signal.h>
 #include <limits.h>
 #include <errno.h>
-#include <inttypes.h>
 
 #include <rte_memcpy.h>
-#include <rte_memory.h>
-#include <rte_string_fns.h>
 
 #include "power_pstate_cpufreq.h"
 #include "power_common.h"
diff --git a/lib/power/power_pstate_cpufreq.h b/lib/power/power_pstate_cpufreq.h
index 3260b32494..7bf64a518c 100644
--- a/lib/power/power_pstate_cpufreq.h
+++ b/lib/power/power_pstate_cpufreq.h
@@ -10,10 +10,6 @@ 
  * RTE Power Management via Intel Pstate driver
  */
 
-#include <rte_common.h>
-#include <rte_byteorder.h>
-#include <rte_log.h>
-#include <rte_string_fns.h>
 #include "rte_power.h"
 
 /**
diff --git a/lib/power/rte_power.c b/lib/power/rte_power.c
index 3cba56bac9..0a6614be77 100644
--- a/lib/power/rte_power.c
+++ b/lib/power/rte_power.c
@@ -10,7 +10,6 @@ 
 #include "power_cppc_cpufreq.h"
 #include "power_kvm_vm.h"
 #include "power_pstate_cpufreq.h"
-#include "power_common.h"
 
 enum power_management_env global_default_env = PM_ENV_NOT_SET;
 
diff --git a/lib/power/rte_power.h b/lib/power/rte_power.h
index c5759afa39..47345e26df 100644
--- a/lib/power/rte_power.h
+++ b/lib/power/rte_power.h
@@ -11,9 +11,7 @@ 
  */
 
 #include <rte_common.h>
-#include <rte_byteorder.h>
 #include <rte_log.h>
-#include <rte_string_fns.h>
 #include <rte_power_guest_channel.h>
 
 #ifdef __cplusplus
diff --git a/lib/power/rte_power_empty_poll.c b/lib/power/rte_power_empty_poll.c
index c4b5de9601..dca88555aa 100644
--- a/lib/power/rte_power_empty_poll.c
+++ b/lib/power/rte_power_empty_poll.c
@@ -5,8 +5,6 @@ 
 #include <string.h>
 
 #include <rte_lcore.h>
-#include <rte_cycles.h>
-#include <rte_atomic.h>
 #include <rte_malloc.h>
 #include <inttypes.h>