diff mbox

bnx2fc: replace printk() with BNX2FC_IO_DBG()

Message ID 1464597661-6192-1-git-send-email-mlombard@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Maurizio Lombardi May 30, 2016, 8:41 a.m. UTC
The "fcp_rsp_code = %d" message isn't an error, it's meant to
be informative only.
This patch prevents a flood of such messages in some situations.

Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Thumshirn May 30, 2016, 8:53 a.m. UTC | #1
On Mon, May 30, 2016 at 10:41:01AM +0200, Maurizio Lombardi wrote:
> The "fcp_rsp_code = %d" message isn't an error, it's meant to
> be informative only.
> This patch prevents a flood of such messages in some situations.
> 
> Tested-by: Laurence Oberman <loberman@redhat.com>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Chad Dupuis May 31, 2016, 1:17 p.m. UTC | #2
> The "fcp_rsp_code = %d" message isn't an error, it's meant to
> be informative only.
> This patch prevents a flood of such messages in some situations.
>
> Tested-by: Laurence Oberman <loberman@redhat.com>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
> drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c
>b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 026f394..8f24d60 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1758,7 +1758,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd
>*io_req,
 > 		if ((fcp_rsp_len == 4) || (fcp_rsp_len == 8)) {
 > 			/* Only for task management function */
 > 			io_req->fcp_rsp_code = rq_data[3];
> -			printk(KERN_ERR PFX "fcp_rsp_code = %d\n",
> +			BNX2FC_IO_DBG(io_req, "fcp_rsp_code = %d\n",
 > 				io_req->fcp_rsp_code);
 > 		}
 
> -- 
> Maurizio Lombardi

Make sense to move this to a debug level.

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen June 1, 2016, 2:45 a.m. UTC | #3
>>>>> "Maurizio" == Maurizio Lombardi <mlombard@redhat.com> writes:

Maurizio> The "fcp_rsp_code = %d" message isn't an error, it's meant to
Maurizio> be informative only.  This patch prevents a flood of such
Maurizio> messages in some situations.

Applied to 4.8/scsi-queue.
diff mbox

Patch

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 026f394..8f24d60 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1758,7 +1758,7 @@  static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
 		if ((fcp_rsp_len == 4) || (fcp_rsp_len == 8)) {
 			/* Only for task management function */
 			io_req->fcp_rsp_code = rq_data[3];
-			printk(KERN_ERR PFX "fcp_rsp_code = %d\n",
+			BNX2FC_IO_DBG(io_req, "fcp_rsp_code = %d\n",
 				io_req->fcp_rsp_code);
 		}