From e5dc376912dab278afdf677cb112008d36ead0fe Mon Sep 17 00:00:00 2001 From: Chip-Kerchner Date: Mon, 2 Oct 2023 12:48:47 -0500 Subject: [PATCH] Remove duplicate defines. --- driver/others/dynamic_power.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/driver/others/dynamic_power.c b/driver/others/dynamic_power.c index 0f5b06be5..7b0b4ea01 100644 --- a/driver/others/dynamic_power.c +++ b/driver/others/dynamic_power.c @@ -43,6 +43,13 @@ static int __builtin_cpu_supports(char* arg) } #endif +#define CPU_UNKNOWN 0 +#define CPU_POWER6 6 +#define CPU_POWER7 7 +#define CPU_POWER8 8 +#define CPU_POWER9 9 +#define CPU_POWER10 10 + #if defined(C_PGI) || defined(__clang__) /* * NV HPC compilers do not yet implement __builtin_cpu_is(). @@ -61,13 +68,6 @@ static int __builtin_cpu_supports(char* arg) * NOTE NV HPC SDK compilers only support POWER8 and POWER9 at this time */ -#define CPU_UNKNOWN 0 -#define CPU_POWER5 5 -#define CPU_POWER6 6 -#define CPU_POWER8 8 -#define CPU_POWER9 9 -#define CPU_POWER10 10 - static struct { uint32_t pvr_mask; uint32_t pvr_value; @@ -191,13 +191,6 @@ static int __builtin_cpu_is(const char *cpu) { #ifdef _AIX #include -#define CPU_UNKNOWN 0 -#define CPU_POWER6 6 -#define CPU_POWER7 7 -#define CPU_POWER8 8 -#define CPU_POWER9 9 -#define CPU_POWER10 10 - static int cpuid(void) { int arch = _system_configuration.implementation;