Skip to content

Commit

Permalink
drivers/base/bus.c: local variables should not be exposed globally
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 18, 2012
1 parent efb4df8 commit 97ec448
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 97ec448

Please sign in to comment.