From: Matthew Wilcox <matthew@wil.cx>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 8/11] [SYM2] Use scsi_print_msg
Date: Tue, 29 Nov 2005 23:08:42 -0500 (EST) [thread overview]
Message-ID: <20051130040842.7C4F17626C@gonzo> (raw)
In-Reply-To: <20051130040537.GC1597@parisc-linux.org>
sym_show_msg was almost a duplicate of scsi_print_msg, except not as
featureful. So use the common code instead.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
---
drivers/scsi/sym53c8xx_2/sym_hipd.c | 29 +++++------------------------
1 files changed, 5 insertions(+), 24 deletions(-)
applies-to: eae46886d0779efc27461f36450ee16cbf776e29
b8a84ef674909ad4f46015e2ad9c512e17ecc6d3
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index aa5404d..5cc1420 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -40,6 +40,7 @@
#include <linux/slab.h>
#include <asm/param.h> /* for timeouts in units of HZ */
+#include <scsi/scsi_dbg.h>
#include "sym_glue.h"
#include "sym_nvram.h"
@@ -70,32 +71,12 @@ static void sym_printl_hex(u_char *p, in
printf (".\n");
}
-/*
- * Print out the content of a SCSI message.
- */
-static int sym_show_msg (u_char * msg)
-{
- u_char i;
- printf ("%x",*msg);
- if (*msg==M_EXTENDED) {
- for (i=1;i<8;i++) {
- if (i-1>msg[1]) break;
- printf ("-%x",msg[i]);
- }
- return (i+1);
- } else if ((*msg & 0xf0) == 0x20) {
- printf ("-%x",msg[1]);
- return (2);
- }
- return (1);
-}
-
static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg)
{
sym_print_addr(cp->cmd, "%s: ", label);
- sym_show_msg(msg);
- printf(".\n");
+ scsi_print_msg(msg);
+ printf("\n");
}
static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_char *msg)
@@ -103,8 +84,8 @@ static void sym_print_nego_msg(struct sy
struct sym_tcb *tp = &np->target[target];
dev_info(&tp->starget->dev, "%s: ", label);
- sym_show_msg(msg);
- printf(".\n");
+ scsi_print_msg(msg);
+ printf("\n");
}
/*
---
0.99.9.GIT
next prev parent reply other threads:[~2005-11-30 4:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 4:05 [PATCH 0/11] sym2 version 2.2.2 Matthew Wilcox
2005-11-30 4:08 ` [PATCH 1/11] [SYM2] Remove FreeBSD ifdefs Matthew Wilcox
2005-11-30 4:08 ` [PATCH 2/11] [SYM2] Remove last vestiges of sym_sniff_inquiry Matthew Wilcox
2005-11-30 4:08 ` [PATCH 3/11] [SYM2] Manage sym_lcb properly Matthew Wilcox
2005-11-30 4:08 ` [PATCH 4/11] [SYM2] Remove code to handle DMA_BIDIRECTION requests Matthew Wilcox
2005-11-30 4:08 ` [PATCH 5/11] [SYM2] Use DMA_40BIT_MASK constant Matthew Wilcox
2005-11-30 4:08 ` [PATCH 6/11] [SYM2] Disable IU and QAS negotiation Matthew Wilcox
2005-11-30 4:08 ` [PATCH 7/11] [SYM2] Negotiate correctly with async-only devices Matthew Wilcox
2005-11-30 4:08 ` Matthew Wilcox [this message]
2005-11-30 4:08 ` [PATCH 9/11] [SYM2] Allow NVRAM settings to limit speed and width Matthew Wilcox
2005-11-30 4:08 ` [PATCH 10/11] [SYM2] Report disabled devices and LUNs more attractively Matthew Wilcox
2005-11-30 4:08 ` [PATCH 11/11] [SYM2] Version 2.2.2 Matthew Wilcox
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=20051130040842.7C4F17626C@gonzo \
--to=matthew@wil.cx \
--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