Skip to content

Commit

Permalink
staging: Make some structures static
Browse files Browse the repository at this point in the history
This was done using a semantic patch (http://coccinelle.lip6.fr/) that
checks that the declaration is not inside a function definition, that the
defined variable is not exported using EXPORTED_SYMBOL, etc, and that the
defined variable does not occur in any other file.  If these conditions
hold, static is added before the declaration.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Julia Lawall authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent e7fcbf0 commit a5ca2df
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ struct binder_transaction_log {
int full;
struct binder_transaction_log_entry entry[32];
};
struct binder_transaction_log binder_transaction_log;
struct binder_transaction_log binder_transaction_log_failed;
static struct binder_transaction_log binder_transaction_log;
static struct binder_transaction_log binder_transaction_log_failed;

static struct binder_transaction_log_entry *binder_transaction_log_add(
struct binder_transaction_log *log)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/dream/qdsp5/audio_aac.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ static int audio_release(struct inode *inode, struct file *file)
return 0;
}

struct audio the_aac_audio;
static struct audio the_aac_audio;

static int audio_open(struct inode *inode, struct file *file)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/dream/qdsp5/audio_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static int audio_in_release(struct inode *inode, struct file *file)
return 0;
}

struct audio_in the_audio_in;
static struct audio_in the_audio_in;

static int audio_in_open(struct inode *inode, struct file *file)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/dream/qdsp5/audio_mp3.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ static int audio_release(struct inode *inode, struct file *file)
return 0;
}

struct audio the_mp3_audio;
static struct audio the_mp3_audio;

static int audio_open(struct inode *inode, struct file *file)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/dream/qdsp5/audio_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static int audio_release(struct inode *inode, struct file *file)
return 0;
}

struct audio the_audio;
static struct audio the_audio;

static int audio_open(struct inode *inode, struct file *file)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/dream/smd/smd_rpcrouter.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct rr_context {
uint32_t count; /* bytes needed in this state */
};

struct rr_context the_rr_context;
static struct rr_context the_rr_context;

static struct platform_device rpcrouter_pdev = {
.name = "oncrpc_router",
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/otus/80211core/performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#ifdef ZM_ENABLE_PERFORMANCE_EVALUATION

#define ZM_TP_SIZE 50
struct zsSummary zm_summary;
struct zsVariation zm_var;
struct zsThroughput zm_tp;
static struct zsSummary zm_summary;
static struct zsVariation zm_var;
static struct zsThroughput zm_tp;

void zfiPerformanceInit(zdev_t* dev)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/otus/hal/hpmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ u32_t zfHpEchoCommand(zdev_t* dev, u32_t value);


#define zm_hp_priv(x) (((struct zsHpPriv*)wd->hpPrivate)->x)
struct zsHpPriv zgHpPriv;
static struct zsHpPriv zgHpPriv;

#define ZM_FIRMWARE_WLAN_ADDR 0x200000
#define ZM_FIRMWARE_SPI_ADDR 0x114000
Expand Down

0 comments on commit a5ca2df

Please sign in to comment.