Skip to contentSkip to conversation

ras: mark stub functions as 'inline'

PATCH In review Arnd Bergmann 3 participants 3 messages Jun 27, 2017 – Jun 28, 2017 RAS infrastructure

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ras: mark stub functions as 'inline'

With CONFIG_RAS disabled, we get two harmless warnings about unused functions:

include/linux/ras.h:37:13: error: 'log_arm_hw_error' defined but not used [-Werror=unused-function]
static void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
include/linux/ras.h:33:13: error: 'log_non_standard_event' defined but not used [-Werror=unused-function]
static void log_non_standard_event(const guid_t *sec_type,

Clearly these are meant to be 'inline', like the other stubs in the same header.

Fixes 297b64c74385 ("ras: acpi / apei: generate trace event for unrecognized CPER section")
Fixes e9279e83ad1f ("trace, ras: add ARM processor error trace event")
---
 include/linux/ras.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
include/linux/ras.h +7 -5
index 7d61863ff265..be5338a35d57 100644
@@ -30,11 +30,13 @@ void log_non_standard_event(const guid_t *sec_type,
 			    const u8 sev, const u8 *err, const u32 len);
 void log_arm_hw_error(struct cper_sec_proc_arm *err);
 #else
-static void log_non_standard_event(const guid_t *sec_type,
-				   const guid_t *fru_id, const char *fru_text,
-				   const u8 sev, const u8 *err,
-				   const u32 len) { return; }
-static void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
+static inline void
+log_non_standard_event(const guid_t *sec_type,
+		       const guid_t *fru_id, const char *fru_text,
+		       const u8 sev, const u8 *err, const u32 len)
+{ return; }
+static inline void
+log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
 #endif
 
 #endif /* __RAS_H__ */
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnd Bergmann

With CONFIG_RAS disabled, we get two harmless warnings about unused functions:

include/linux/ras.h:37:13: error: 'log_arm_hw_error' defined but not used [-Werror=unused-function]
static void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
include/linux/ras.h:33:13: error: 'log_non_standard_event' defined but not used [-Werror=unused-function]
static void log_non_standard_event(const guid_t *sec_type,

Clearly these are meant to be 'inline', like the other stubs in the same header.

Quoted 6 lines
Fixes 297b64c74385 ("ras: acpi / apei: generate trace event for unrecognized CPER section")
Fixes e9279e83ad1f ("trace, ras: add ARM processor error trace event")
---
 include/linux/ras.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

I'm assuming Will is picking this one up along with the rest of the ARM RAS pile...

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#2 lore raw
Quoted 19 lines · Borislav Petkov
Quoted 11 lines · Arnd Bergmann

With CONFIG_RAS disabled, we get two harmless warnings about unused functions:

include/linux/ras.h:37:13: error: 'log_arm_hw_error' defined but not used [-Werror=unused-function]
static void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
include/linux/ras.h:33:13: error: 'log_non_standard_event' defined but not used [-Werror=unused-function]
static void log_non_standard_event(const guid_t *sec_type,

Clearly these are meant to be 'inline', like the other stubs in the same header.

Quoted 6 lines
Fixes 297b64c74385 ("ras: acpi / apei: generate trace event for unrecognized CPER section")
Fixes e9279e83ad1f ("trace, ras: add ARM processor error trace event")
---
 include/linux/ras.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Quoted 4 lines

I'm assuming Will is picking this one up along with the rest of the ARM RAS pile...

Yup, will do. Thanks.

Will