public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: jgarzik@pobox.com
Subject: Re: [SCSI] allow sleeping in ->eh_device_reset_handler()
Date: Mon, 20 Jun 2005 17:30:54 -0400	[thread overview]
Message-ID: <20050620213054.GA14191@redhat.com> (raw)
In-Reply-To: <200506181820.j5IIKLlm021250@hera.kernel.org>

On Sat, Jun 18, 2005 at 11:20:21AM -0700, Linux Kernel wrote:
 > tree 1609752ea7a9adb28583147f0bea33a9f10877d7
 > parent 8fa728a26886f56a9ee10a44fea0ddda301d21c3
 > author Jeff Garzik <jgarzik@pobox.com> Sat, 28 May 2005 15:55:48 -0400
 > committer Jeff Garzik <jgarzik@pobox.com> Fri, 17 Jun 2005 22:05:03 -0500
 > 
 > [SCSI] allow sleeping in ->eh_device_reset_handler()
 > 
 > Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

 .. deletia ...
 
 > ===================================================================
 > --- 105ead5c90057400abae0c8aa9e2b5ba1818c327/drivers/scsi/megaraid.c  (mode:100644 sha1:8d707b29027da4dcab34942adcc7aac9f5e11a8e)
 > +++ 1609752ea7a9adb28583147f0bea33a9f10877d7/drivers/scsi/megaraid.c  (mode:100644 sha1:80b0c40c522b7023369c6498ad24165892b8ff55)
 > @@ -1938,7 +1938,7 @@ megaraid_abort(Scsi_Cmnd *cmd)
 >  
 >  
 >  static int
 > -megaraid_reset(Scsi_Cmnd *cmd)
 > +__megaraid_reset(Scsi_Cmnd *cmd)
 >  {
 >  	adapter_t	*adapter;
 >  	megacmd_t	mc;
 > @@ -1972,6 +1972,18 @@ megaraid_reset(Scsi_Cmnd *cmd)
 >  	return rval;
 >  }
 >  
 > +static int
 > +megaraid_reset(Scsi_Cmnd *cmd)
 > +{
 > +	adapter = (adapter_t *)cmd->device->host->hostdata;
 > +	int rc;
 > +
 > +	spin_lock_irq(&adapter->lock);
 > +	rc = __megaraid_reset(cmd);
 > +	spin_unlock_irq(&adapter->lock);
 > +
 > +	return rc;
 > +}

This doesn't compile.

drivers/scsi/megaraid.c:1978: error: 'adapter' undeclared (first use in this function)
drivers/scsi/megaraid.c:1978: error: (Each undeclared identifier is reported only once
drivers/scsi/megaraid.c:1978: error: for each function it appears in.)
drivers/scsi/megaraid.c:1979: warning: ISO C90 forbids mixed declarations and code

This should fix it.. (untested due to lack of hardware)

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.12/drivers/scsi/megaraid.c~	2005-06-20 17:23:27.000000000 -0400
+++ linux-2.6.12/drivers/scsi/megaraid.c	2005-06-20 17:29:03.000000000 -0400
@@ -1975,9 +1975,11 @@ __megaraid_reset(Scsi_Cmnd *cmd)
 static int
 megaraid_reset(Scsi_Cmnd *cmd)
 {
-	adapter = (adapter_t *)cmd->device->host->hostdata;
+	adapter_t *adapter;
 	int rc;
 
+	adapter = cmd->device->host->hostdata;
+
 	spin_lock_irq(&adapter->lock);
 	rc = __megaraid_reset(cmd);
 	spin_unlock_irq(&adapter->lock);


           reply	other threads:[~2005-06-20 21:35 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200506181820.j5IIKLlm021250@hera.kernel.org>]

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=20050620213054.GA14191@redhat.com \
    --to=davej@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox