All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] scsi_register return code check
Date: Mon, 11 Sep 2006 13:40:53 +0000	[thread overview]
Message-ID: <45056765.3040201@student.ltu.se> (raw)
In-Reply-To: <1157974000.7814.54.camel@amol.verismonetworks.com>

Amol Lad wrote:

>Audited return codes for scsi_register and found only 2 defaulters
>
>Tested with
>- allmodconfig
>- Tweaking Kconfig to make sure the changes do not produce any
>errors/warnings
>
>Signed-off-by: Amol Lad <amol@verismonetworks.com>
>---
> drivers/scsi/gdth.c        |    9 +++++++++
> drivers/scsi/mac_scsi.c    |    4 ++++
> include/linux/utsrelease.h |    1 +
> 3 files changed, 14 insertions(+)
>---
>diff -uprN -X linux-2.6.18-rc6-orig/Documentation/dontdiff linux-2.6.18-rc6-orig/drivers/scsi/gdth.c linux-2.6.18-rc6/drivers/scsi/gdth.c
>--- linux-2.6.18-rc6-orig/drivers/scsi/gdth.c	2006-09-11 11:07:25.000000000 +0530
>+++ linux-2.6.18-rc6/drivers/scsi/gdth.c	2006-09-11 16:47:08.000000000 +0530
>@@ -4440,6 +4440,9 @@ static int __init gdth_detect(Scsi_Host_
>                     /* register addit. SCSI channels as virtual controllers */
>                     for (b = 1; b < ha->bus_cnt + 1; ++b) {
>                         shp = scsi_register(shtp,sizeof(gdth_num_str));
>+                        if (shp = NULL)
>  
>
Think it should be "if (!shp)".

>+                            continue;
>+
>                         shp->unchecked_isa_dma = 1;
>                         shp->irq = ha->irq;
>                         shp->dma_channel = ha->drq;
>@@ -4564,6 +4567,9 @@ static int __init gdth_detect(Scsi_Host_
>                     /* register addit. SCSI channels as virtual controllers */
>                     for (b = 1; b < ha->bus_cnt + 1; ++b) {
>                         shp = scsi_register(shtp,sizeof(gdth_num_str));
>+                        if (shp = NULL)
>  
>
and here

>+                            continue;
>+
>                         shp->unchecked_isa_dma = 0;
>                         shp->irq = ha->irq;
>                         shp->dma_channel = 0xff;
>@@ -4703,6 +4709,9 @@ static int __init gdth_detect(Scsi_Host_
>             /* register addit. SCSI channels as virtual controllers */
>             for (b = 1; b < ha->bus_cnt + 1; ++b) {
>                 shp = scsi_register(shtp,sizeof(gdth_num_str));
>+                if (shp = NULL)
>  
>
and here

>+                    continue;
>+
>                 shp->unchecked_isa_dma = 0;
>                 shp->irq = ha->irq;
>                 shp->dma_channel = 0xff;
>diff -uprN -X linux-2.6.18-rc6-orig/Documentation/dontdiff linux-2.6.18-rc6-orig/drivers/scsi/mac_scsi.c linux-2.6.18-rc6/drivers/scsi/mac_scsi.c
>--- linux-2.6.18-rc6-orig/drivers/scsi/mac_scsi.c	2006-09-11 11:07:26.000000000 +0530
>+++ linux-2.6.18-rc6/drivers/scsi/mac_scsi.c	2006-09-11 16:48:02.000000000 +0530
>@@ -265,6 +265,10 @@ int macscsi_detect(struct scsi_host_temp
>     /* Once we support multiple 5380s (e.g. DuoDock) we'll do
>        something different here */
>     instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
>+    if (instance = NULL) {
>  
>
and "if (!instance) {"

>+        printk(KERN_ERR "mac_scsi: scsi_register failed.\n");
>+        return 0;
>+    }
> #if NDEBUG
>     default_instance = instance;
> #endif
>diff -uprN -X linux-2.6.18-rc6-orig/Documentation/dontdiff linux-2.6.18-rc6-orig/include/linux/utsrelease.h linux-2.6.18-rc6/include/linux/utsrelease.h
>--- linux-2.6.18-rc6-orig/include/linux/utsrelease.h	1970-01-01 05:30:00.000000000 +0530
>+++ linux-2.6.18-rc6/include/linux/utsrelease.h	2006-09-11 15:57:19.000000000 +0530
>@@ -0,0 +1 @@
>+#define UTS_RELEASE "2.6.18-rc6"
>  
>
This is an autogenerated file. For some reason it has not been included 
in the "dontdiff"-file.

cu
Richard Knutsson

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2006-09-11 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11 11:38 [KJ] [PATCH] scsi_register return code check Amol Lad
2006-09-11 13:40 ` Richard Knutsson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45056765.3040201@student.ltu.se \
    --to=ricknu-0@student.ltu.se \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.