* [PATCH] Staging: dt3155: make local variables static
@ 2010-07-23 18:45 H Hartley Sweeten
2010-07-23 18:58 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2010-07-23 18:45 UTC (permalink / raw)
To: Linux Kernel; +Cc: devel, gregkh, ss
The symbols dt3155_dev_open, unique_tag, and allocatorAddr are only used in
the file dt3155_drv.c and should be static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Scott Smedley <ss@aao.gov.au>
---
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index 9e7b880..49924d0 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Staging: dt3155: make local variables static
2010-07-23 18:45 [PATCH] Staging: dt3155: make local variables static H Hartley Sweeten
@ 2010-07-23 18:58 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2010-07-23 18:58 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, devel, ss, gregkh
On Fri, 2010-07-23 at 11:45 -0700, H Hartley Sweeten wrote:
> The symbols dt3155_dev_open, unique_tag, and allocatorAddr are only used in
> the file dt3155_drv.c and should be static.
> diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
> index 9e7b880..49924d0 100644
> --- a/drivers/staging/dt3155/dt3155_drv.c
> +++ b/drivers/staging/dt3155/dt3155_drv.c
> @@ -118,14 +118,14 @@ static void __iomem *dt3155_lbase[MAXBOARDS] = { NULL
[]
> -u32 dt3155_dev_open[MAXBOARDS] = {0
> +static u32 dt3155_dev_open[MAXBOARDS] = {0
[]
> -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-23 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23 18:45 [PATCH] Staging: dt3155: make local variables static H Hartley Sweeten
2010-07-23 18:58 ` Joe Perches
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®