From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH] Remove 'unhandled error code' messages
Date: Thu, 10 Nov 2011 15:12:07 +0100 [thread overview]
Message-ID: <1320934327-8384-1-git-send-email-hare@suse.de> (raw)
scsi_io_completion() tries to take some action based on
the command result and sense code. It also displays
'unhandled error code' or 'unhandled sense code' in case
no special handling was found.
This serves as an additional source of confusion to
the unsuspecting user, as the message in fact means
'everything okay, no special casing required',
and not 'oh gosh, something has happened and the system
couldn't deal with it'.
Plus it doesn't add any value for debugging, as the
actual error and sense code is printed with the next
statement anyway.
So remove these lines.
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index f85cfa6..1975b3f 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -921,12 +921,10 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
action = ACTION_FAIL;
break;
default:
- description = "Unhandled sense code";
action = ACTION_FAIL;
break;
}
} else {
- description = "Unhandled error code";
action = ACTION_FAIL;
}
next reply other threads:[~2011-11-10 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 14:12 Hannes Reinecke [this message]
2011-11-10 14:55 ` [PATCH] Remove 'unhandled error code' messages James Bottomley
2011-11-10 15:18 ` Hannes Reinecke
2011-11-10 15:44 ` James Bottomley
2011-11-10 17:27 ` Rob Evers
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=1320934327-8384-1-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=jbottomley@parallels.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).