Skip to contentSkip to conversation

Staging: dt3155: make local variables static

PATCH In review H Hartley Sweeten 2 participants 2 messages Jul 23, 2010 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: dt3155: make local variables static

The symbols dt3155_dev_open, unique_tag, and allocatorAddr are only used in the file dt3155_drv.c and should be static.

Cc Greg Kroah-Hartman <[email protected]>
Cc Scott Smedley <[email protected]>

---

drivers/staging/dt3155/dt3155_drv.c +3 -3
index 9e7b880..49924d0 100644
@@ -118,14 +118,14 @@ static void __iomem *dt3155_lbase[MAXBOARDS] = { NULL
 #endif
 };
 
-u32  dt3155_dev_open[MAXBOARDS] = {0
+static u32  dt3155_dev_open[MAXBOARDS] = {0
 #if MAXBOARDS == 2
 				       , 0
 #endif
 };
 
 u32  ndevices = 0;
-u32 unique_tag = 0;;
+static u32 unique_tag = 0;;
 
 
 /*
@@ -937,7 +937,7 @@ err:
   return -EIO;
 }
 
-u32 allocatorAddr = 0;
+static u32 allocatorAddr = 0;
 
 
 int dt3155_init(void)
#1 lore raw

drivers/staging/dt3155/dt3155_drv.c static void __iomem *dt3155_lbase[MAXBOARDS] = { NULL

Quoted 7 lines · H Hartley Sweeten

The symbols dt3155_dev_open, unique_tag, and allocatorAddr are only used in the file dt3155_drv.c and should be static.

drivers/staging/dt3155/dt3155_drv.c +0 -0
index 9e7b880..49924d0 100644
@@ -118,14 +118,14 @@ static void __iomem *dt3155_lbase[MAXBOARDS] = { NULL

[]

drivers/staging/dt3155/dt3155_drv.c static void __iomem *dt3155_lbase[MAXBOARDS] = { NULL · line 121

Quoted 2 lines
drivers/staging/dt3155/dt3155_drv.c +1 -1
-u32  dt3155_dev_open[MAXBOARDS] = {0
+static u32  dt3155_dev_open[MAXBOARDS] = {0

[]

drivers/staging/dt3155/dt3155_drv.c static void __iomem *dt3155_lbase[MAXBOARDS] = { NULL · line 128

Quoted 2 lines
drivers/staging/dt3155/dt3155_drv.c +1 -1
-u32 unique_tag = 0;;
+static u32 unique_tag = 0;;

Statics don't need initialization and could you fix the style issues ("{0", ";;") at the same time please?

static u32 dt3155_dev_open[MAXBOARDS];
static u32 unique_tag;