All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: linux-pcmcia@lists.infradead.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 11/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (scsi)
Date: Sat, 24 Oct 2009 22:39:58 +0200	[thread overview]
Message-ID: <20091024203958.GA1714@isilmar.linta.de> (raw)
In-Reply-To: <200910242216.55136.eike-kernel@sf-tec.de>

On Sat, Oct 24, 2009 at 10:16:49PM +0200, Rolf Eike Beer wrote:
> Dominik Brodowski wrote:
> 
> > @@ -164,19 +152,21 @@ static int aha152x_config_cs(struct pcmcia_device
> >  *link) {
> >      scsi_info_t *info = link->priv;
> >      struct aha152x_setup s;
> > -    int last_ret, last_fn;
> > +    int ret
> >      struct Scsi_Host *host;
> 
> This looks not even compile tested, there is a semicolon missing.

Indeed, for this driver is !64BIT.... Updated patch (aha152x_stub.c only)
attached.

Thanks for noticing this issue.

	Dominik


diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index 67cde01..4329e4e 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -54,15 +54,6 @@
 #include <pcmcia/cistpl.h>
 #include <pcmcia/ds.h>
 
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0644);
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"aha152x_cs.c 1.54 2000/06/12 21:27:25 (David Hinds)";
-#else
-#define DEBUG(n, args...)
-#endif
 
 /*====================================================================*/
 
@@ -103,7 +94,7 @@ static int aha152x_probe(struct pcmcia_device *link)
 {
     scsi_info_t *info;
 
-    DEBUG(0, "aha152x_attach()\n");
+    dev_dbg(&link->dev, "aha152x_attach()\n");
 
     /* Create new SCSI device */
     info = kzalloc(sizeof(*info), GFP_KERNEL);
@@ -127,7 +118,7 @@ static int aha152x_probe(struct pcmcia_device *link)
 
 static void aha152x_detach(struct pcmcia_device *link)
 {
-    DEBUG(0, "aha152x_detach(0x%p)\n", link);
+    dev_dbg(&link->dev, "aha152x_detach\n");
 
     aha152x_release_cs(link);
 
@@ -137,9 +128,6 @@ static void aha152x_detach(struct pcmcia_device *link)
 
 /*====================================================================*/
 
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
 static int aha152x_config_check(struct pcmcia_device *p_dev,
 				cistpl_cftable_entry_t *cfg,
 				cistpl_cftable_entry_t *dflt,
@@ -164,19 +152,22 @@ static int aha152x_config_cs(struct pcmcia_device *link)
 {
     scsi_info_t *info = link->priv;
     struct aha152x_setup s;
-    int last_ret, last_fn;
+    int ret;
     struct Scsi_Host *host;
 
-    DEBUG(0, "aha152x_config(0x%p)\n", link);
+    dev_dbg(&link->dev, "aha152x_config\n");
 
-    last_ret = pcmcia_loop_config(link, aha152x_config_check, NULL);
-    if (last_ret) {
-	cs_error(link, RequestIO, last_ret);
-	goto failed;
-    }
+    ret = pcmcia_loop_config(link, aha152x_config_check, NULL);
+    if (ret)
+	    goto failed;
 
-    CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
-    CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
+    ret = pcmcia_request_irq(link, &link->irq);
+    if (ret)
+	    goto failed;
+
+    ret = pcmcia_request_configuration(link, &link->conf);
+    if (ret)
+	    goto failed;
     
     /* Set configuration options for the aha152x driver */
     memset(&s, 0, sizeof(s));
@@ -194,7 +185,7 @@ static int aha152x_config_cs(struct pcmcia_device *link)
     host = aha152x_probe_one(&s);
     if (host == NULL) {
 	printk(KERN_INFO "aha152x_cs: no SCSI devices found\n");
-	goto cs_failed;
+	goto failed;
     }
 
     sprintf(info->node.dev_name, "scsi%d", host->host_no);
@@ -203,8 +194,6 @@ static int aha152x_config_cs(struct pcmcia_device *link)
 
     return 0;
 
-cs_failed:
-    cs_error(link, last_fn, last_ret);
 failed:
     aha152x_release_cs(link);
     return -ENODEV;

  reply	other threads:[~2009-10-24 20:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-24 19:42 [RFC] more PCMCIA cleanup patches for 2.6.33 Dominik Brodowski
2009-10-24 19:42 ` [PATCH 04/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (ide) Dominik Brodowski
2009-10-26 15:47   ` Sergei Shtylyov
2009-10-26 15:33     ` Dominik Brodowski
2009-10-24 19:42 ` [PATCH 08/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (net) Dominik Brodowski
2009-10-24 19:42 ` [PATCH 09/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (ray-cs.c) Dominik Brodowski
2009-10-24 19:42   ` Dominik Brodowski
2009-10-24 19:43 ` [PATCH 10/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (wireless) Dominik Brodowski
2009-10-24 19:43   ` Dominik Brodowski
2009-10-24 19:43 ` [PATCH 11/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (scsi) Dominik Brodowski
2009-10-24 20:16   ` Rolf Eike Beer
2009-10-24 20:39     ` Dominik Brodowski [this message]
2009-10-24 19:43 ` [PATCH 12/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (serial_cs) Dominik Brodowski
2009-10-24 19:43 ` [PATCH 13/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound) Dominik Brodowski
2009-11-02 10:43   ` Takashi Iwai
2009-10-24 19:43 ` [PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers) Dominik Brodowski
2009-10-26  6:42   ` Artem Bityutskiy
2009-10-26  7:13     ` Dominik Brodowski
2009-10-26  7:26       ` Artem Bityutskiy
2009-10-26  7:56         ` Dominik Brodowski
2009-10-26  8:05           ` Artem Bityutskiy
2009-10-26 10:19         ` Alan Cox
2009-10-26 10:18           ` Artem Bityutskiy
2009-11-03  8:37             ` Artem Bityutskiy
2009-11-07 11:19               ` pcmciamtd -- what's broken, who needs it? Dominik Brodowski
2009-11-07 11:29                 ` Komuro
2009-11-07 11:33                   ` Dominik Brodowski
2009-11-07 16:57                     ` Kristoffer Ericson
2009-11-08  8:12                       ` Dominik Brodowski
2009-11-07 22:33                 ` Komuro
2009-11-04 10:20             ` PETEC 2MB SRAM Pep Talens

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=20091024203958.GA1714@isilmar.linta.de \
    --to=linux@dominikbrodowski.net \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux-scsi@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.