* [PATCH] SCSI: DTC: Removed 0 initialization for statics
@ 2015-06-28 18:48 Rudhresh
2015-08-25 1:54 ` Finn Thain
0 siblings, 1 reply; 2+ messages in thread
From: Rudhresh @ 2015-06-28 18:48 UTC (permalink / raw)
To: schmitzmic; +Cc: linux-scsi, linux-kernel, Rudhresh, Rudhresh Kumar J
Removed unneccessary initialization of zero to a static variable
Signed-off-by: Rudhresh Kumar J <rudhreshj@cdac.in>
---
drivers/scsi/dtc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c
index 4c74c7b..99164d6 100644
--- a/drivers/scsi/dtc.c
+++ b/drivers/scsi/dtc.c
@@ -150,7 +150,7 @@ static const struct signature {
static int __init dtc_setup(char *str)
{
- static int commandline_current = 0;
+ static int commandline_current;
int i;
int ints[10];
@@ -188,7 +188,7 @@ __setup("dtc=", dtc_setup);
static int __init dtc_detect(struct scsi_host_template * tpnt)
{
- static int current_override = 0, current_base = 0;
+ static int current_override, current_base;
struct Scsi_Host *instance;
unsigned int addr;
void __iomem *base;
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] SCSI: DTC: Removed 0 initialization for statics
2015-06-28 18:48 [PATCH] SCSI: DTC: Removed 0 initialization for statics Rudhresh
@ 2015-08-25 1:54 ` Finn Thain
0 siblings, 0 replies; 2+ messages in thread
From: Finn Thain @ 2015-08-25 1:54 UTC (permalink / raw)
To: Rudhresh Kumar J; +Cc: schmitzmic, linux-scsi, linux-kernel
On Mon, 29 Jun 2015, Rudhresh wrote:
> Removed unneccessary initialization of zero to a static variable
>
> Signed-off-by: Rudhresh Kumar J <rudhreshj@cdac.in>
> ---
> drivers/scsi/dtc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c
> index 4c74c7b..99164d6 100644
> --- a/drivers/scsi/dtc.c
> +++ b/drivers/scsi/dtc.c
> @@ -150,7 +150,7 @@ static const struct signature {
>
> static int __init dtc_setup(char *str)
> {
> - static int commandline_current = 0;
> + static int commandline_current;
> int i;
> int ints[10];
>
> @@ -188,7 +188,7 @@ __setup("dtc=", dtc_setup);
>
> static int __init dtc_detect(struct scsi_host_template * tpnt)
> {
> - static int current_override = 0, current_base = 0;
> + static int current_override, current_base;
> struct Scsi_Host *instance;
> unsigned int addr;
> void __iomem *base;
>
This issue affects all four copies of this code in the NCR5380 drivers:
drivers/scsi/t128.c: static int commandline_current = 0;
drivers/scsi/t128.c: static int current_override = 0, current_base = 0;
drivers/scsi/dtc.c: static int commandline_current = 0;
drivers/scsi/dtc.c: static int current_override = 0, current_base = 0;
drivers/scsi/g_NCR5380.c: static int commandline_current = 0;
drivers/scsi/g_NCR5380.c: static int current_override = 0;
drivers/scsi/pas16.c: static int commandline_current = 0;
drivers/scsi/pas16.c: static int current_override = 0;
drivers/scsi/pas16.c: static unsigned short current_base = 0;
And there are more instances of redundant initialization in pas16.c,
NCR5380.c and sun3_scsi.c.
All of these drivers have the same maintainers, so I'd prefer a single
patch to fix this.
You must address your patches to all of the interested parties (see
scripts/get_maintainer.pl).
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-25 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 18:48 [PATCH] SCSI: DTC: Removed 0 initialization for statics Rudhresh
2015-08-25 1:54 ` Finn Thain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).