[dpdk-dev,v2,4/4] power: clean up of power common header

Message ID 20171128132203.43181-4-marko.kovacevic@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Kovacevic, Marko Nov. 28, 2017, 1:22 p.m. UTC
  Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 lib/librte_power/power_acpi_cpufreq.c                   | 2 +-
 lib/librte_power/{rte_power_common.h => power_common.h} | 6 +++---
 lib/librte_power/rte_power.c                            | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename lib/librte_power/{rte_power_common.h => power_common.h} (95%)
  

Comments

Hunt, David Dec. 11, 2017, 10:48 a.m. UTC | #1
Hi Marko,


On 28/11/2017 1:22 PM, Marko Kovacevic wrote:
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> ---
>   lib/librte_power/power_acpi_cpufreq.c                   | 2 +-
>   lib/librte_power/{rte_power_common.h => power_common.h} | 6 +++---
>   lib/librte_power/rte_power.c                            | 2 +-
>   3 files changed, 5 insertions(+), 5 deletions(-)
>   rename lib/librte_power/{rte_power_common.h => power_common.h} (95%)
>
> diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
> index 165ec97..fd1931f 100644
> --- a/lib/librte_power/power_acpi_cpufreq.c
> +++ b/lib/librte_power/power_acpi_cpufreq.c
> @@ -45,7 +45,7 @@
>   #include <rte_atomic.h>
>   
>   #include "power_acpi_cpufreq.h"
> -#include "rte_power_common.h"
> +#include "power_common.h"
>   
>   #ifdef RTE_LIBRTE_POWER_DEBUG
>   #define POWER_DEBUG_TRACE(fmt, args...) do { \
> diff --git a/lib/librte_power/rte_power_common.h b/lib/librte_power/power_common.h
> similarity index 95%
> rename from lib/librte_power/rte_power_common.h
> rename to lib/librte_power/power_common.h
>

--snip--

Could I suggest adding the following into the commit message?

"Rename private header file rte_power_common.h to power_common.h to 
prevent private functions from leaking into the documentation."

Apart from that, if you make those changes, you can include my Ack in 
the next revision.

Series-Acked-By: David Hunt <david.hunt@intel.com>
  

Patch

diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
index 165ec97..fd1931f 100644
--- a/lib/librte_power/power_acpi_cpufreq.c
+++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -45,7 +45,7 @@ 
 #include <rte_atomic.h>
 
 #include "power_acpi_cpufreq.h"
-#include "rte_power_common.h"
+#include "power_common.h"
 
 #ifdef RTE_LIBRTE_POWER_DEBUG
 #define POWER_DEBUG_TRACE(fmt, args...) do { \
diff --git a/lib/librte_power/rte_power_common.h b/lib/librte_power/power_common.h
similarity index 95%
rename from lib/librte_power/rte_power_common.h
rename to lib/librte_power/power_common.h
index 64bd168..cbf3b7f 100644
--- a/lib/librte_power/rte_power_common.h
+++ b/lib/librte_power/power_common.h
@@ -31,9 +31,9 @@ 
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RTE_POWER_COMMON_H_
-#define RTE_POWER_COMMON_H_
+#ifndef _POWER_COMMON_H_
+#define _POWER_COMMON_H_
 
 #define RTE_POWER_INVALID_FREQ_INDEX (~0)
 
-#endif /* RTE_POWER_COMMON_H_ */
+#endif /* POWER_COMMON_H_ */
diff --git a/lib/librte_power/rte_power.c b/lib/librte_power/rte_power.c
index af9b504..e76f3fd 100644
--- a/lib/librte_power/rte_power.c
+++ b/lib/librte_power/rte_power.c
@@ -36,7 +36,7 @@ 
 #include "rte_power.h"
 #include "power_acpi_cpufreq.h"
 #include "power_kvm_vm.h"
-#include "rte_power_common.h"
+#include "power_common.h"
 
 enum power_management_env global_default_env = PM_ENV_NOT_SET;