Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH 6/14] megaraid_sas: Fix megasas_get_cmd printk
@ 2011-02-25  4:56 adam radford
  2011-02-28 17:50 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: adam radford @ 2011-02-25  4:56 UTC (permalink / raw)
  To: linux-scsi, Bo.Yang

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

James/Linux-scsi,

The following patch for megaraid_sas fixes a megasas_get_cmd printk.

Signed-off-by: Adam Radford <aradford@gmail.com>

diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c
scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c
--- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c	2011-02-24
18:49:07.531369391 -0800
+++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c	2011-02-24
18:49:45.987337951 -0800
@@ -186,7 +186,8 @@
 				 struct megasas_cmd, list);
 		list_del_init(&cmd->list);
 	} else {
-		printk(KERN_ERR "megasas: Command pool empty!\n");
+		if (megasas_dbg_lvl)
+			printk(KERN_ERR "megasas: Command pool empty!\n");
 	}

 	spin_unlock_irqrestore(&instance->cmd_pool_lock, flags);

[-- Attachment #2: megaraid_sas.patch6 --]
[-- Type: application/octet-stream, Size: 615 bytes --]

diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c
--- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c	2011-02-24 18:49:07.531369391 -0800
+++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c	2011-02-24 18:49:45.987337951 -0800
@@ -186,7 +186,8 @@
 				 struct megasas_cmd, list);
 		list_del_init(&cmd->list);
 	} else {
-		printk(KERN_ERR "megasas: Command pool empty!\n");
+		if (megasas_dbg_lvl)
+			printk(KERN_ERR "megasas: Command pool empty!\n");
 	}
 
 	spin_unlock_irqrestore(&instance->cmd_pool_lock, flags);

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

* Re: [PATCH 6/14] megaraid_sas: Fix megasas_get_cmd printk
  2011-02-25  4:56 [PATCH 6/14] megaraid_sas: Fix megasas_get_cmd printk adam radford
@ 2011-02-28 17:50 ` James Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2011-02-28 17:50 UTC (permalink / raw)
  To: adam radford; +Cc: linux-scsi, Bo.Yang

On Thu, 2011-02-24 at 20:56 -0800, adam radford wrote:
> James/Linux-scsi,
> 
> The following patch for megaraid_sas fixes a megasas_get_cmd printk.
> 
> Signed-off-by: Adam Radford <aradford@gmail.com>
> 
> diff -Naur scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c
> scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c
> --- scsi-misc-2.6/drivers/scsi/megaraid/megaraid_sas_base.c	2011-02-24
> 18:49:07.531369391 -0800
> +++ scsi-misc-2.6.new/drivers/scsi/megaraid/megaraid_sas_base.c	2011-02-24
> 18:49:45.987337951 -0800
> @@ -186,7 +186,8 @@
>  				 struct megasas_cmd, list);
>  		list_del_init(&cmd->list);
>  	} else {
> -		printk(KERN_ERR "megasas: Command pool empty!\n");
> +		if (megasas_dbg_lvl)
> +			printk(KERN_ERR "megasas: Command pool empty!\n");

Why not just use KERN_DEBUG instead of KERN_ERR here and forget the if
(megasas_dbg_lvl)?

James



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

end of thread, other threads:[~2011-02-28 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25  4:56 [PATCH 6/14] megaraid_sas: Fix megasas_get_cmd printk adam radford
2011-02-28 17:50 ` James Bottomley

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