mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/base/bus.c: local variables should not be exposed globally
@ 2012-04-17  1:14 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-04-17  1:14 UTC (permalink / raw)
  To: Linux Kernel; +Cc: gregkh

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.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---

diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 26a06b8..2bcef65 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -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)
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-17  1:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17  1:14 [PATCH] drivers/base/bus.c: local variables should not be exposed globally H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®