Skip to content

Commit

Permalink
[PATCH] remove outdated print_* functions
Browse files Browse the repository at this point in the history
We have the scsi_print_* functions in the proper namespace for a long
time now and there weren't a lot users left.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Unknown authored and James Bottomley committed Apr 18, 2005
1 parent b665112 commit db9dff3
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 82 deletions.
23 changes: 12 additions & 11 deletions drivers/scsi/53c7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
#endif

#include "scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include "53c7xx.h"
#include <linux/stat.h>
Expand Down Expand Up @@ -1721,9 +1722,9 @@ NCR53c7xx_run_tests (struct Scsi_Host *host) {
printk ("scsi%d : test 2 INQUIRY to target %d, lun 0 : %s\n",
host->host_no, i, data + 8);
printk ("scsi%d : status ", host->host_no);
print_status (status);
scsi_print_status (status);
printk ("\nscsi%d : message ", host->host_no);
print_msg (&msg);
scsi_print_msg (&msg);
printk ("\n");
} else if (hostdata->test_completed == 3) {
printk("scsi%d : test 2 no connection with target %d\n",
Expand Down Expand Up @@ -2312,7 +2313,7 @@ NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host, struct
printk ("scsi%d : received message", host->host_no);
if (c)
printk (" from target %d lun %d ", c->device->id, c->device->lun);
print_msg ((unsigned char *) hostdata->msg_buf);
scsi_print_msg ((unsigned char *) hostdata->msg_buf);
printk("\n");
}

Expand Down Expand Up @@ -3204,7 +3205,7 @@ create_cmd (Scsi_Cmnd *cmd) {
case WRITE_10:
#if 0
printk("scsi%d : command is ", host->host_no);
print_command(cmd->cmnd);
__scsi_print_command(cmd->cmnd);
#endif
#if 0
printk ("scsi%d : %d scatter/gather segments\n", host->host_no,
Expand Down Expand Up @@ -3232,7 +3233,7 @@ create_cmd (Scsi_Cmnd *cmd) {
*/
default:
printk("scsi%d : datain+dataout for command ", host->host_no);
print_command(cmd->cmnd);
__scsi_print_command(cmd->cmnd);
datain = dataout = 2 * (cmd->use_sg ? cmd->use_sg : 1) + 3;
}

Expand Down Expand Up @@ -3938,7 +3939,7 @@ intr_scsi (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
if (cmd) {
printk("scsi%d : target %d, lun %d, command ",
host->host_no, cmd->cmd->device->id, cmd->cmd->device->lun);
print_command (cmd->cmd->cmnd);
__scsi_print_command (cmd->cmd->cmnd);
printk("scsi%d : dsp = 0x%x (virt 0x%p)\n", host->host_no,
NCR53c7x0_read32(DSP_REG),
bus_to_virt(NCR53c7x0_read32(DSP_REG)));
Expand Down Expand Up @@ -4208,7 +4209,7 @@ NCR53c7x0_intfly (struct Scsi_Host *host)
if (hostdata->options & OPTION_DEBUG_INTR) {
printk ("scsi%d : command complete : pid %lu, id %d,lun %d result 0x%x ",
host->host_no, tmp->pid, tmp->device->id, tmp->device->lun, tmp->result);
print_command (tmp->cmnd);
__scsi_print_command (tmp->cmnd);
}

tmp->scsi_done(tmp);
Expand Down Expand Up @@ -4297,7 +4298,7 @@ NCR53c7x0_intr (int irq, void *dev_id, struct pt_regs * regs)
printk("scsi%d : interrupt for pid %lu, id %d, lun %d ",
host->host_no, cmd->cmd->pid, (int) cmd->cmd->device->id,
(int) cmd->cmd->device->lun);
print_command (cmd->cmd->cmnd);
__scsi_print_command (cmd->cmd->cmnd);
} else {
printk("scsi%d : no active command\n", host->host_no);
}
Expand Down Expand Up @@ -5539,7 +5540,7 @@ print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) {
i > 0 && !check_address ((unsigned long) ptr, 1);
ptr += len, i -= len) {
printk(" ");
len = print_msg (ptr);
len = scsi_print_msg (ptr);
printk("\n");
if (!len)
break;
Expand All @@ -5554,7 +5555,7 @@ print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) {
if (cmd) {
printk(" result = 0x%x, target = %d, lun = %d, cmd = ",
cmd->result, cmd->device->id, cmd->device->lun);
print_command(cmd->cmnd);
__scsi_print_command(cmd->cmnd);
} else
printk("\n");
printk(" + %d : dsa_next = 0x%x\n", hostdata->dsa_next,
Expand Down Expand Up @@ -6028,7 +6029,7 @@ dump_events (struct Scsi_Host *host, int count) {
virt_to_bus(event.dsa), event.dsa);
if (event.pid != -1) {
printk (" event for pid %ld ", event.pid);
print_command (event.cmnd);
__scsi_print_command (event.cmnd);
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions drivers/scsi/NCR5380.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
* 5. Test linked command handling code after Eric is ready with
* the high level code.
*/
#include <scsi/scsi_dbg.h>

#if (NDEBUG & NDEBUG_LISTS)
#define LIST(x,y) {printk("LINE:%d Adding %p to %p\n", __LINE__, (void*)(x), (void*)(y)); if ((x)==(y)) udelay(5); }
Expand Down Expand Up @@ -2371,7 +2372,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
* 3..length+1 arguments
*
* Start the extended message buffer with the EXTENDED_MESSAGE
* byte, since print_msg() wants the whole thing.
* byte, since scsi_print_msg() wants the whole thing.
*/
extended_msg[0] = EXTENDED_MESSAGE;
/* Accept first byte by clearing ACK */
Expand Down Expand Up @@ -2418,7 +2419,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
default:
if (!tmp) {
printk("scsi%d: rejecting message ", instance->host_no);
print_msg(extended_msg);
scsi_print_msg(extended_msg);
printk("\n");
} else if (tmp != EXTENDED_MESSAGE)
printk("scsi%d: rejecting unknown message %02x from target %d, lun %d\n", instance->host_no, tmp, cmd->device->id, cmd->device->lun);
Expand Down Expand Up @@ -2552,7 +2553,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) {

if (!(msg[0] & 0x80)) {
printk(KERN_ERR "scsi%d : expecting IDENTIFY message, got ", instance->host_no);
print_msg(msg);
scsi_print_msg(msg);
abort = 1;
} else {
/* Accept message by clearing ACK */
Expand Down Expand Up @@ -2677,7 +2678,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) {
Scsi_Cmnd *tmp, **prev;

printk(KERN_WARNING "scsi%d : aborting command\n", instance->host_no);
print_Scsi_Cmnd(cmd);
scsi_print_command(cmd);

NCR5380_print_status(instance);

Expand Down
17 changes: 9 additions & 8 deletions drivers/scsi/aha152x.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
#include <scsi/scsicam.h>

#include "scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include "aha152x.h"

Expand Down Expand Up @@ -986,7 +987,7 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int p
if (HOSTDATA(shpnt)->debug & debug_queue) {
printk(INFO_LEAD "queue: %p; cmd_len=%d pieces=%d size=%u cmnd=",
CMDINFO(SCpnt), SCpnt, SCpnt->cmd_len, SCpnt->use_sg, SCpnt->request_bufflen);
print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd);
}
#endif

Expand Down Expand Up @@ -1560,7 +1561,7 @@ static void busfree_run(struct Scsi_Host *shpnt)
#if 0
if(HOSTDATA(shpnt)->debug & debug_eh) {
printk(ERR_LEAD "received sense: ", CMDINFO(DONE_SC));
print_sense("bh", DONE_SC);
scsi_print_sense("bh", DONE_SC);
}
#endif

Expand Down Expand Up @@ -1846,7 +1847,7 @@ static void msgi_run(struct Scsi_Host *shpnt)
#if defined(AHA152X_DEBUG)
if (HOSTDATA(shpnt)->debug & debug_msgi) {
printk(INFO_LEAD "inbound message %02x ", CMDINFO(CURRENT_SC), MSGI(0));
print_msg(&MSGI(0));
scsi_print_msg(&MSGI(0));
printk("\n");
}
#endif
Expand Down Expand Up @@ -1934,7 +1935,7 @@ static void msgi_run(struct Scsi_Host *shpnt)
break;

printk(INFO_LEAD, CMDINFO(CURRENT_SC));
print_msg(&MSGI(0));
scsi_print_msg(&MSGI(0));
printk("\n");

ticks = (MSGI(3) * 4 + 49) / 50;
Expand Down Expand Up @@ -2032,7 +2033,7 @@ static void msgo_init(struct Scsi_Host *shpnt)
int i;

printk(DEBUG_LEAD "messages( ", CMDINFO(CURRENT_SC));
for (i=0; i<MSGOLEN; i+=print_msg(&MSGO(i)), printk(" "))
for (i=0; i<MSGOLEN; i+=scsi_print_msg(&MSGO(i)), printk(" "))
;
printk(")\n");
}
Expand Down Expand Up @@ -2104,7 +2105,7 @@ static void cmd_init(struct Scsi_Host *shpnt)
#if defined(AHA152X_DEBUG)
if (HOSTDATA(shpnt)->debug & debug_cmd) {
printk(DEBUG_LEAD "cmd_init: ", CMDINFO(CURRENT_SC));
print_command(CURRENT_SC->cmnd);
__scsi_print_command(CURRENT_SC->cmnd);
}
#endif

Expand Down Expand Up @@ -2158,7 +2159,7 @@ static void status_run(struct Scsi_Host *shpnt)
#if defined(AHA152X_DEBUG)
if (HOSTDATA(shpnt)->debug & debug_status) {
printk(DEBUG_LEAD "inbound status %02x ", CMDINFO(CURRENT_SC), CURRENT_SC->SCp.Status);
print_status(CURRENT_SC->SCp.Status);
scsi_print_status(CURRENT_SC->SCp.Status);
printk("\n");
}
#endif
Expand Down Expand Up @@ -2925,7 +2926,7 @@ static void show_command(Scsi_Cmnd *ptr)
printk(KERN_DEBUG "0x%08x: target=%d; lun=%d; cmnd=(",
(unsigned int) ptr, ptr->device->id, ptr->device->lun);

print_command(ptr->cmnd);
__scsi_print_command(ptr->cmnd);

printk(KERN_DEBUG "); request_bufflen=%d; resid=%d; phase |",
ptr->request_bufflen, ptr->resid);
Expand Down
9 changes: 5 additions & 4 deletions drivers/scsi/arm/acornscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
#include <asm/ecard.h>

#include "../scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include "acornscsi.h"
#include "msgqueue.h"
Expand Down Expand Up @@ -866,7 +867,7 @@ void acornscsi_done(AS_Host *host, Scsi_Cmnd **SCpntp, unsigned int result)
default:
printk(KERN_ERR "scsi%d.H: incomplete data transfer detected: result=%08X command=",
host->host->host_no, SCpnt->result);
print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd);
acornscsi_dumpdma(host, "done");
acornscsi_dumplog(host, SCpnt->device->id);
SCpnt->result &= 0xffff;
Expand Down Expand Up @@ -1369,7 +1370,7 @@ void acornscsi_sendmessage(AS_Host *host)

host->scsi.last_message = msg->msg[0];
#if (DEBUG & DEBUG_MESSAGES)
print_msg(msg->msg);
scsi_print_msg(msg->msg);
#endif
break;

Expand All @@ -1391,7 +1392,7 @@ void acornscsi_sendmessage(AS_Host *host)
while ((msg = msgqueue_getmsg(&host->scsi.msgs, msgnr++)) != NULL) {
unsigned int i;
#if (DEBUG & DEBUG_MESSAGES)
print_msg(msg);
scsi_print_msg(msg);
#endif
i = 0;
if (acornscsi_write_pio(host, msg->msg, &i, msg->length, 1000000))
Expand Down Expand Up @@ -1487,7 +1488,7 @@ void acornscsi_message(AS_Host *host)
#if (DEBUG & DEBUG_MESSAGES)
printk("scsi%d.%c: message in: ",
host->host->host_no, acornscsi_target(host));
print_msg(message);
scsi_print_msg(message);
printk("\n");
#endif

Expand Down
9 changes: 5 additions & 4 deletions drivers/scsi/arm/fas216.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <asm/ecard.h>

#include "../scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include "fas216.h"
#include "scsi.h"
Expand Down Expand Up @@ -309,7 +310,7 @@ fas216_log_command(FAS216_Info *info, int level, Scsi_Cmnd *SCpnt, char *fmt, ..
va_end(args);

printk(" CDB: ");
print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd);
}

static void
Expand Down Expand Up @@ -2081,7 +2082,7 @@ fas216_std_done(FAS216_Info *info, Scsi_Cmnd *SCpnt, unsigned int result)
info->host->host_no, '0' + SCpnt->device->id,
SCpnt->result, info->scsi.SCp.ptr,
info->scsi.SCp.this_residual);
print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd);
SCpnt->result &= ~(255 << 16);
SCpnt->result |= DID_BAD_TARGET << 16;
goto request_sense;
Expand Down Expand Up @@ -2170,7 +2171,7 @@ static void fas216_done(FAS216_Info *info, unsigned int result)
info->host->host_no, '0' + SCpnt->device->id,
info->scsi.SCp.ptr, info->scsi.SCp.this_residual);
info->scsi.SCp.ptr = NULL;
print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd);
}

/*
Expand Down Expand Up @@ -2426,7 +2427,7 @@ int fas216_eh_abort(Scsi_Cmnd *SCpnt)
info->stats.aborts += 1;

printk(KERN_WARNING "scsi%d: abort command ", info->host->host_no);
print_command(SCpnt->data_cmnd);
__scsi_print_command(SCpnt->data_cmnd);

print_debug_list();
fas216_dumpstate(info);
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt)
#if 0 //def BELT_AND_BRACES
printk(KERN_WARNING "scsi%d.%c: zero length buffer passed for "
"command ", SCpnt->host->host_no, '0' + SCpnt->target);
print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd);
#endif
SCpnt->SCp.ptr = NULL;
}
Expand Down
9 changes: 5 additions & 4 deletions drivers/scsi/atari_NCR5380.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
* 1. Test linked command handling code after Eric is ready with
* the high level code.
*/
#include <scsi/scsi_dbg.h>

#if (NDEBUG & NDEBUG_LISTS)
#define LIST(x,y) \
Expand Down Expand Up @@ -2354,7 +2355,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
* 3..length+1 arguments
*
* Start the extended message buffer with the EXTENDED_MESSAGE
* byte, since print_msg() wants the whole thing.
* byte, since scsi_print_msg() wants the whole thing.
*/
extended_msg[0] = EXTENDED_MESSAGE;
/* Accept first byte by clearing ACK */
Expand Down Expand Up @@ -2407,7 +2408,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
default:
if (!tmp) {
printk(KERN_DEBUG "scsi%d: rejecting message ", HOSTNO);
print_msg (extended_msg);
scsi_print_msg (extended_msg);
printk("\n");
} else if (tmp != EXTENDED_MESSAGE)
printk(KERN_DEBUG "scsi%d: rejecting unknown "
Expand Down Expand Up @@ -2540,7 +2541,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)

if (!(msg[0] & 0x80)) {
printk(KERN_DEBUG "scsi%d: expecting IDENTIFY message, got ", HOSTNO);
print_msg(msg);
scsi_print_msg(msg);
do_abort(instance);
return;
}
Expand Down Expand Up @@ -2646,7 +2647,7 @@ int NCR5380_abort (Scsi_Cmnd *cmd)
unsigned long flags;

printk(KERN_NOTICE "scsi%d: aborting command\n", HOSTNO);
print_Scsi_Cmnd (cmd);
scsi_print_command(cmd);

NCR5380_print_status (instance);

Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static void scsi_print_cdb(unsigned char *cdb, int cdb_len, int start_of_line)

/**
*
* print_status - print scsi status description
* scsi_print_status - print scsi status description
* @scsi_status: scsi status value
*
* If the status is recognized, the description is printed.
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
scsi_print_command(cmd);
if (status_byte(cmd->result) & CHECK_CONDITION) {
/*
* XXX The print_sense formatting/prefix
* XXX The scsi_print_sense formatting/prefix
* doesn't match this function.
*/
scsi_print_sense("", cmd);
Expand Down
Loading

0 comments on commit db9dff3

Please sign in to comment.