public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* a trival bug of megaraid in patch 2.6.12-mm1
@ 2005-06-21 10:03 bobl
  2005-06-21 10:20 ` Michael Buesch
  2005-06-21 15:05 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: bobl @ 2005-06-21 10:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

Hi, Andrew Morton:

    In 2.6.12-mm1 patch, there are some lines as follow:

 300379 +static int
 300380 +megaraid_reset(Scsi_Cmnd *cmd)
 300381 +{
 300382 +       adapter = (adapter_t *)cmd->device->host->hostdata;
 300383 +       int rc;
 300384 +
 300385 +       spin_lock_irq(&adapter->lock);
 300386 +       rc = __megaraid_reset(cmd);
 300387 +       spin_unlock_irq(&adapter->lock);
 300388 +
 300389 +       return rc;
 300390 +}

    I think between line 300381 and 300382 should add follow line:

       adapter_t       *adapter;

    The attachment is the patch, please confirm it.

    Best Regards
  
    Bob



[-- Attachment #2: linux-2.6.12-mm1-megaraid.patch --]
[-- Type: text/x-patch, Size: 437 bytes --]

diff -purN linux-2.6.12/drivers/scsi/megaraid.c linux-2.6.12.new/drivers/scsi/megaraid.c
--- linux-2.6.12/drivers/scsi/megaraid.c	2005-06-21 18:49:50.118732304 +0900
+++ linux-2.6.12.new/drivers/scsi/megaraid.c	2005-06-21 18:57:55.266978560 +0900
@@ -1975,6 +1975,7 @@ __megaraid_reset(Scsi_Cmnd *cmd)
 static int
 megaraid_reset(Scsi_Cmnd *cmd)
 {
+	adapter_t	*adapter;
 	adapter = (adapter_t *)cmd->device->host->hostdata;
 	int rc;
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a trival bug of megaraid in patch 2.6.12-mm1
  2005-06-21 10:03 a trival bug of megaraid in patch 2.6.12-mm1 bobl
@ 2005-06-21 10:20 ` Michael Buesch
  2005-06-21 10:40   ` bobl
  2005-06-21 15:05 ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Buesch @ 2005-06-21 10:20 UTC (permalink / raw)
  To: bobl; +Cc: Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

Quoting bobl <bobl@turbolinux.com>:
>     The attachment is the patch, please confirm it.

> diff -purN linux-2.6.12/drivers/scsi/megaraid.c linux-2.6.12.new/drivers/scsi/megaraid.c
> --- linux-2.6.12/drivers/scsi/megaraid.c        2005-06-21 18:49:50.118732304 +0900
> +++ linux-2.6.12.new/drivers/scsi/megaraid.c    2005-06-21 18:57:55.266978560 +0900
> @@ -1975,6 +1975,7 @@ __megaraid_reset(Scsi_Cmnd *cmd)
>  static int
>  megaraid_reset(Scsi_Cmnd *cmd)
>  {
> +       adapter_t       *adapter;
>         adapter = (adapter_t *)cmd->device->host->hostdata;
>         int rc;

That's mixed code and declarations (aka Not Good (tm)).
Please do something like this instead:

-       adapter = (adapter_t *)cmd->device->host->hostdata;
+       adapter_t *adapter = (adapter_t *)cmd->device->host->hostdata;
        int rc;


-- 
Greetings, Michael



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a trival bug of megaraid in patch 2.6.12-mm1
  2005-06-21 10:20 ` Michael Buesch
@ 2005-06-21 10:40   ` bobl
  0 siblings, 0 replies; 4+ messages in thread
From: bobl @ 2005-06-21 10:40 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Michael Buesch wrote:

>Quoting bobl <bobl@turbolinux.com>:
>  
>
>>    The attachment is the patch, please confirm it.
>>    
>>
>
>  
>
>>diff -purN linux-2.6.12/drivers/scsi/megaraid.c linux-2.6.12.new/drivers/scsi/megaraid.c
>>--- linux-2.6.12/drivers/scsi/megaraid.c        2005-06-21 18:49:50.118732304 +0900
>>+++ linux-2.6.12.new/drivers/scsi/megaraid.c    2005-06-21 18:57:55.266978560 +0900
>>@@ -1975,6 +1975,7 @@ __megaraid_reset(Scsi_Cmnd *cmd)
>> static int
>> megaraid_reset(Scsi_Cmnd *cmd)
>> {
>>+       adapter_t       *adapter;
>>        adapter = (adapter_t *)cmd->device->host->hostdata;
>>        int rc;
>>    
>>
>
>That's mixed code and declarations (aka Not Good (tm)).
>Please do something like this instead:
>
>-       adapter = (adapter_t *)cmd->device->host->hostdata;
>+       adapter_t *adapter = (adapter_t *)cmd->device->host->hostdata;
>        int rc;
>
>
>  
>

Thanks!

The attachment is the new one!

[-- Attachment #2: linux-2.6.12-mm1-megaraid.patch --]
[-- Type: text/x-patch, Size: 523 bytes --]

diff -purN linux-2.6.12.orig/drivers/scsi/megaraid.c linux-2.6.12.new/drivers/scsi/megaraid.c
--- linux-2.6.12.orig/drivers/scsi/megaraid.c	2005-06-21 19:37:38.846619376 +0900
+++ linux-2.6.12.new/drivers/scsi/megaraid.c	2005-06-21 19:38:03.241910728 +0900
@@ -1975,7 +1975,7 @@ __megaraid_reset(Scsi_Cmnd *cmd)
 static int
 megaraid_reset(Scsi_Cmnd *cmd)
 {
-	adapter = (adapter_t *)cmd->device->host->hostdata;
+	adapter_t *adapter = (adapter_t *)cmd->device->host->hostdata;
 	int rc;
 
 	spin_lock_irq(&adapter->lock);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a trival bug of megaraid in patch 2.6.12-mm1
  2005-06-21 10:03 a trival bug of megaraid in patch 2.6.12-mm1 bobl
  2005-06-21 10:20 ` Michael Buesch
@ 2005-06-21 15:05 ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2005-06-21 15:05 UTC (permalink / raw)
  To: bobl; +Cc: Andrew Morton, linux-kernel, SCSI Mailing List

bobl wrote:
> Hi, Andrew Morton:
> 
>    In 2.6.12-mm1 patch, there are some lines as follow:
> 
> 300379 +static int
> 300380 +megaraid_reset(Scsi_Cmnd *cmd)
> 300381 +{
> 300382 +       adapter = (adapter_t *)cmd->device->host->hostdata;
> 300383 +       int rc;
> 300384 +
> 300385 +       spin_lock_irq(&adapter->lock);
> 300386 +       rc = __megaraid_reset(cmd);
> 300387 +       spin_unlock_irq(&adapter->lock);
> 300388 +
> 300389 +       return rc;
> 300390 +}
> 
>    I think between line 300381 and 300382 should add follow line:
> 
>       adapter_t       *adapter;
> 
>    The attachment is the patch, please confirm it.
> 
>    Best Regards
>  
>    Bob
> 
> 
> 
> ------------------------------------------------------------------------
> 
> diff -purN linux-2.6.12/drivers/scsi/megaraid.c linux-2.6.12.new/drivers/scsi/megaraid.c
> --- linux-2.6.12/drivers/scsi/megaraid.c	2005-06-21 18:49:50.118732304 +0900
> +++ linux-2.6.12.new/drivers/scsi/megaraid.c	2005-06-21 18:57:55.266978560 +0900
> @@ -1975,6 +1975,7 @@ __megaraid_reset(Scsi_Cmnd *cmd)
>  static int
>  megaraid_reset(Scsi_Cmnd *cmd)
>  {
> +	adapter_t	*adapter;
>  	adapter = (adapter_t *)cmd->device->host->hostdata;
>  	int rc;
>  

I think this is my screw-up.  I'll get the fix in...

	Jeff




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-06-21 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 10:03 a trival bug of megaraid in patch 2.6.12-mm1 bobl
2005-06-21 10:20 ` Michael Buesch
2005-06-21 10:40   ` bobl
2005-06-21 15:05 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox