remove scsi_device proc printing from drivers
PATCH 1/1 remove scsi_device proc printing from drivers
A bunch of drivers contain loops over host->my_devices in their proc_info method just to printout info we already get from sysfs. Kill those, the ones that actually add additional information from their private data need to get sysfs attributes for the fist.
BTW, does someone have opintions on reading of /proc/scsi/scsi? It's just a duplication of the sysfs tree so it should probably go away also. OTOH there's a slightly higher chance on userland actually using this than for the LLDDs..
drivers/acorn/scsi/acornscsi.c +0 -31
@@ -2935,37 +2935,6 @@ } } - p +=sprintf (p,"\nAttached devices:\n" ); - -list_for_each_entry (scd, &instance->my_devices, siblings) { -int len; - -proc_print_scsidevice (scd, p, &len,0 ); - p += len; - - p +=sprintf (p,"Extensions: " ); - -if (scd->tagged_supported) - p +=sprintf (p,"TAG %sabled [%d] " , - scd->tagged_queue ?"en" :"dis" , scd->current_tag); - p +=sprintf (p,"\nTransfers: " ); -if (host->device[scd->id].sync_xfer &15 ) - p +=sprintf (p,"sync, offset %d, %d ns\n" , - host->device[scd->id].sync_xfer &15 , -acornscsi_getperiod (host->device[scd->id].sync_xfer)); -else - p +=sprintf (p,"async\n" ); - - pos = p - buffer; -if (pos + begin < offset) { - begin += pos; - p = buffer; - } - pos = p - buffer; -if (pos + begin > offset + length) -break ; - } - pos = p - buffer; *start = buffer + (offset - begin);
drivers/acorn/scsi/cumana_2.c +0 -20
@@ -380,26 +380,6 @@ pos +=sprintf (buffer+pos,"\nAttached devices:\n" ); -list_for_each_entry (scd, &host->my_devices, siblings) { -int len; - -proc_print_scsidevice (scd, buffer, &len, pos); - pos += len; - pos +=sprintf (buffer+pos,"Extensions: " ); -if (scd->tagged_supported) - pos +=sprintf (buffer+pos,"TAG %sabled [%d] " , - scd->tagged_queue ?"en" :"dis" , - scd->current_tag); - pos +=sprintf (buffer+pos,"\n" ); - -if (pos + begin < offset) { - begin += pos; - pos =0 ; - } -if (pos + begin > offset + length) -break ; - } - *start = buffer + (offset - begin); pos -= offset - begin;if (pos > length)
drivers/acorn/scsi/eesox.c +0 -19
@@ -452,25 +452,6 @@ pos +=fas216_print_stats (&info->info, buffer + pos); - pos +=sprintf (buffer+pos,"\nAttached devices:\n" ); - -list_for_each_entry (scd, &host->my_devices, siblings) { -int len; - -proc_print_scsidevice (scd, buffer, &len, pos); - pos += len; - pos +=sprintf (buffer+pos,"Extensions: " ); -if (scd->tagged_supported) - pos +=sprintf (buffer+pos,"TAG %sabled [%d] " , - scd->tagged_queue ?"en" :"dis" , - scd->current_tag); - pos +=sprintf (buffer+pos,"\n" ); - -if (pos + begin < offset) { - begin += pos; - pos =0 ; - } - } *start = buffer + (offset - begin); pos -= offset - begin;if (pos > length)
drivers/ieee1394/sbp2.c +0 -25
@@ -3018,7 +3018,6 @@static int sbp2scsi_proc_info (char *buffer,char **start,off_t offset,int length,int hostno,int inout) { -Scsi_Device *scd;struct Scsi_Host *host;struct sbp2scsi_host_info *hi;char *pos = buffer;
@@ -3044,30 +3043,6 @@SPRINTF (" max_sectors : %d\n" , max_sectors);SPRINTF (" serialize_io : %s\n" , serialize_io ?"yes" :"no" );SPRINTF (" exclusive_login : %s\n" , exclusive_login ?"yes" :"no" ); - -SPRINTF ("\nAttached devices : %s\n" , !list_empty (&host->my_devices) ? -"" :"none" ); - - list_for_each_entry (scd, &host->my_devices, siblings) { -int i; - -SPRINTF (" [Channel: %02d, Id: %02d, Lun: %02d] " , scd->channel, - scd->id, scd->lun); -SPRINTF ("%s " , (scd->type <MAX_SCSI_DEVICE_CODE ) ? - scsi_device_types[(short ) scd->type] :"Unknown device" ); - -for (i =0 ; (i <8 ) && (scd->vendor[i] >=0x20 ); i++) -SPRINTF ("%c" , scd->vendor[i]); - -SPRINTF (" " ); - -for (i =0 ; (i <16 ) && (scd->model[i] >=0x20 ); i++) -SPRINTF ("%c" , scd->model[i]); - -SPRINTF ("\n" ); - } - -SPRINTF ("\n" );/* release the reference count on this host */ scsi_host_put (host);
drivers/scsi/wd7000.c +0 -21
@@ -1450,27 +1450,6 @@SPRINTF (count ?"\n" :"none\n" );#endif -/* -* Display driver information for each device attached to the board. -*/ -SPRINTF ("\nAttached devices: %s\n" , !list_empty (&host->my_devices) ? -"" :"none" ); - - list_for_each_entry (scd, &host->my_devices, siblings) { -SPRINTF (" [Channel: %02d, Id: %02d, Lun: %02d] " , scd->channel, scd->id, scd->lun); -SPRINTF ("%s " , (scd->type <MAX_SCSI_DEVICE_CODE ) ? scsi_device_types[(short ) scd->type] :"Unknown device" ); - -for (i =0 ; (i <8 ) && (scd->vendor[i] >=0x20 ); i++) -SPRINTF ("%c" , scd->vendor[i]); -SPRINTF (" " ); - -for (i =0 ; (i <16 ) && (scd->model[i] >=0x20 ); i++) -SPRINTF ("%c" , scd->model[i]); -SPRINTF ("\n" ); - } - -SPRINTF ("\n" ); -spin_unlock_irqrestore (host->host_lock, flags);/*
Quoted 4 lines · Christoph Hellwig
BTW, does someone have opintions on reading of
/proc/scsi/scsi? It's just a duplication of the sysfs tree so it should probably go away also. OTOH there's a slightly higher chance on userland actually using this than for the LLDDs..
IMO leave it for 2.6, and remove /proc/scsi/scsi read (and maybe writes, if we have sysfs replacement in 2.6) in 2.7.
-- Patrick Mansfield