From 99ef0f0ac36021d9005f6b4079772d33213c0598 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 18 Jul 2024 17:40:17 +0200 Subject: [PATCH] ras-events: don't use extern inside a C file Fix a checkpatch warning: ras-events.c:66: WARNING:AVOID_EXTERNS: externs should be avoided in .c files by better handing how checks_inside var is handled. Signed-off-by: Mauro Carvalho Chehab --- ras-events.c | 2 +- ras-events.h | 2 ++ rasdaemon.c | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ras-events.c b/ras-events.c index 81535e8..ad85bcf 100644 --- a/ras-events.c +++ b/ras-events.c @@ -63,7 +63,7 @@ #define ENDIAN KBUFFER_ENDIAN_BIG #endif -extern char *choices_disable; +char *choices_disable; static const struct event_trigger event_triggers[] = { { "mc_event", &mc_event_trigger_setup }, diff --git a/ras-events.h b/ras-events.h index 135219e..c94bdd6 100644 --- a/ras-events.h +++ b/ras-events.h @@ -24,6 +24,8 @@ #include "types.h" +extern char *choices_disable; + struct mce_priv; struct ras_mc_offline_event; diff --git a/rasdaemon.c b/rasdaemon.c index 79b1605..02e863e 100644 --- a/rasdaemon.c +++ b/rasdaemon.c @@ -35,7 +35,6 @@ #define TOOL_DESCRIPTION "RAS daemon to log the RAS events." #define ARGS_DOC "" #define DISABLE "DISABLE" -char *choices_disable; const char *argp_program_version = TOOL_NAME " " VERSION; const char *argp_program_bug_address = "Mauro Carvalho Chehab "; -- 2.49.0