Skip to contentSkip to conversation

drivers/base/bus.c: local variables should not be exposed globally

PATCH New H Hartley Sweeten 1 participant 1 message Apr 17, 2012 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/base/bus.c: local variables should not be exposed globally

The variable 'system_kset' is only referenced in this file and should be marked static to prevent it from being exposed globally.

This quiets the sparse waring:

warning: symbol 'system_kset' was not declared. Should it be static?

Also, remove the comment since drivers/base/sys.c has now been deleted.

Cc Greg Kroah-Hartman <[email protected]>

---

drivers/base/bus.c +1 -2
index 26a06b8..2bcef65 100644
@@ -21,8 +21,7 @@
 #include "power/power.h"
 
 /* /sys/devices/system */
-/* FIXME: make static after drivers/base/sys.c is deleted */
-struct kset *system_kset;
+static struct kset *system_kset;
 
 #define to_bus_attr(_attr) container_of(_attr, struct bus_attribute, attr)