Commit f99dbcfa authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] 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..
parent caddf53a
......@@ -2935,37 +2935,6 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset,
}
}
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);
......
......@@ -380,26 +380,6 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
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)
......
......@@ -452,25 +452,6 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
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)
......
......@@ -1450,27 +1450,6 @@ static int wd7000_proc_info(char *buffer, char **start, off_t offset, int length
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);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment