diff options
-rw-r--r-- | arch/powerpc/include/asm/firmware.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/firmware.c | 8 |
2 files changed, 3 insertions, 6 deletions
diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h index 097dee57a7a9..f9651b288da1 100644 --- a/arch/powerpc/include/asm/firmware.h +++ b/arch/powerpc/include/asm/firmware.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/feature-fixups.h> | 18 | #include <asm/feature-fixups.h> |
19 | 19 | ||
20 | /* firmware feature bitmask values */ | 20 | /* firmware feature bitmask values */ |
21 | #define FIRMWARE_MAX_FEATURES 63 | ||
22 | 21 | ||
23 | #define FW_FEATURE_PFT ASM_CONST(0x0000000000000001) | 22 | #define FW_FEATURE_PFT ASM_CONST(0x0000000000000001) |
24 | #define FW_FEATURE_TCE ASM_CONST(0x0000000000000002) | 23 | #define FW_FEATURE_TCE ASM_CONST(0x0000000000000002) |
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c index aa3693f7fb27..1236a9d6146a 100644 --- a/arch/powerpc/platforms/pseries/firmware.c +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -39,7 +39,7 @@ typedef struct { | |||
39 | * string must match. | 39 | * string must match. |
40 | */ | 40 | */ |
41 | static __initdata firmware_feature_t | 41 | static __initdata firmware_feature_t |
42 | firmware_features_table[FIRMWARE_MAX_FEATURES] = { | 42 | firmware_features_table[] = { |
43 | {FW_FEATURE_PFT, "hcall-pft"}, | 43 | {FW_FEATURE_PFT, "hcall-pft"}, |
44 | {FW_FEATURE_TCE, "hcall-tce"}, | 44 | {FW_FEATURE_TCE, "hcall-tce"}, |
45 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | 45 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, |
@@ -77,12 +77,10 @@ void __init fw_feature_init(const char *hypertas, unsigned long len) | |||
77 | pr_debug(" -> fw_feature_init()\n"); | 77 | pr_debug(" -> fw_feature_init()\n"); |
78 | 78 | ||
79 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { | 79 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { |
80 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { | 80 | for (i = 0; i < ARRAY_SIZE(firmware_features_table); i++) { |
81 | const char *name = firmware_features_table[i].name; | 81 | const char *name = firmware_features_table[i].name; |
82 | size_t size; | 82 | size_t size; |
83 | /* check value against table of strings */ | 83 | |
84 | if (!name) | ||
85 | continue; | ||
86 | /* | 84 | /* |
87 | * If there is a '*' at the end of name, only check | 85 | * If there is a '*' at the end of name, only check |
88 | * upto there | 86 | * upto there |