Dead code removal.  This was probably useful for mode-sense debugging, but
we don't need it anymore.  And, since we're about to change how s-g lists
are handled, it would need fixing that we don't want to bother to do.

Greg, please apply.

Matt

----- Forwarded message from Alan Stern <[EMAIL PROTECTED]> -----

Date: Fri, 21 Nov 2003 13:19:35 -0500 (EST)
From: Alan Stern <[EMAIL PROTECTED]>
Subject: PATCH: (as138) Remove dead code from debug.c
To: Matthew Dharm <[EMAIL PROTECTED]>
cc: USB Storage List <[EMAIL PROTECTED]>
Return-Path: <[EMAIL PROTECTED]>
X-Spam-Status: No, hits=-4.0 required=5.0 tests=UNIFIED_PATCH,RCVD_IN_ORBZ version=2.11

Matt:

This patch removes an uncalled subroutine from debug.c.  I only noticed it 
when tracking down scatter-gather usage; there didn't seem to be any 
reason to repair it since it wasn't being used anywhere.

Alan Stern


===== debug.c 1.12 vs edited =====
--- 1.12/drivers/usb/storage/debug.c    Tue Jan 14 12:00:35 2003
+++ edited/drivers/usb/storage/debug.c  Fri Nov 21 11:26:33 2003
@@ -150,65 +150,6 @@
        US_DEBUGPX("\n");
 }
 
-void usb_stor_print_Scsi_Cmnd(Scsi_Cmnd *cmd)
-{
-       int i=0, bufferSize = cmd->request_bufflen;
-       u8 *buffer = cmd->request_buffer;
-       struct scatterlist *sg = (struct scatterlist*)cmd->request_buffer;
-
-       US_DEBUGP("Dumping information about %p.\n", cmd);
-       US_DEBUGP("cmd->cmnd[0] value is %d.\n", cmd->cmnd[0]);
-       US_DEBUGP("(MODE_SENSE is %d and MODE_SENSE_10 is %d)\n",
-                 MODE_SENSE, MODE_SENSE_10);
-
-       US_DEBUGP("buffer is %p with length %d.\n", buffer, bufferSize);
-       for (i=0; i<bufferSize; i+=16) {
-               US_DEBUGP("%02x %02x %02x %02x %02x %02x %02x %02x\n"
-                         "%02x %02x %02x %02x %02x %02x %02x %02x\n",
-                         buffer[i],
-                         buffer[i+1],
-                         buffer[i+2],
-                         buffer[i+3],
-                         buffer[i+4],
-                         buffer[i+5],
-                         buffer[i+6],
-                         buffer[i+7],
-                         buffer[i+8],
-                         buffer[i+9],
-                         buffer[i+10],
-                         buffer[i+11],
-                         buffer[i+12],
-                         buffer[i+13],
-                         buffer[i+14],
-                         buffer[i+15] );
-       }
-
-       US_DEBUGP("Buffer has %d scatterlists.\n", cmd->use_sg );
-       for (i=0; i<cmd->use_sg; i++) {
-               char *adr = sg_address(sg[i]);
-               
-               US_DEBUGP("Length of scatterlist %d is %d.\n",i,sg[i].length);
-               US_DEBUGP("%02x %02x %02x %02x %02x %02x %02x %02x\n"
-                         "%02x %02x %02x %02x %02x %02x %02x %02x\n",
-                         adr[0],
-                         adr[1],
-                         adr[2],
-                         adr[3],
-                         adr[4],
-                         adr[5],
-                         adr[6],
-                         adr[7],
-                         adr[8],
-                         adr[9],
-                         adr[10],
-                         adr[11],
-                         adr[12],
-                         adr[13],
-                         adr[14],
-                         adr[15]);
-       }
-}
-
 void usb_stor_show_sense(
                unsigned char key,
                unsigned char asc,
===== debug.h 1.6 vs edited =====
--- 1.6/drivers/usb/storage/debug.h     Mon Jul 28 14:29:04 2003
+++ edited/drivers/usb/storage/debug.h  Fri Nov 21 11:26:45 2003
@@ -53,7 +53,6 @@
 
 #ifdef CONFIG_USB_STORAGE_DEBUG
 void usb_stor_show_command(Scsi_Cmnd *srb);
-void usb_stor_print_Scsi_Cmnd( Scsi_Cmnd* cmd );
 void usb_stor_show_sense( unsigned char key,
                unsigned char asc, unsigned char ascq );
 #define US_DEBUGP(x...) printk( KERN_DEBUG USB_STORAGE x )

----- End forwarded message -----

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

C:  Like the Furby?
DP: He gives me the creeps.  Think the SPCA will take him?
                                        -- Cobb and Dust Puppy
User Friendly, 1/2/1999

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to