* [PATCH] remove scsi_device proc printing from drivers
@ 2003-04-27 16:56 Christoph Hellwig
2003-04-27 18:10 ` Patrick Mansfield
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2003-04-27 16:56 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi
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..
--- 1.25/drivers/acorn/scsi/acornscsi.c Wed Mar 19 10:19:28 2003
+++ edited/drivers/acorn/scsi/acornscsi.c Sun Apr 27 09:12:47 2003
@@ -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);
--- 1.22/drivers/acorn/scsi/cumana_2.c Sun Jan 26 14:34:36 2003
+++ edited/drivers/acorn/scsi/cumana_2.c Sun Apr 27 09:12:47 2003
@@ -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)
--- 1.22/drivers/acorn/scsi/eesox.c Sun Jan 26 14:34:36 2003
+++ edited/drivers/acorn/scsi/eesox.c Sun Apr 27 09:12:47 2003
@@ -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)
--- 1.28/drivers/ieee1394/sbp2.c Mon Apr 21 12:30:57 2003
+++ edited/drivers/ieee1394/sbp2.c Sun Apr 27 09:15:05 2003
@@ -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);
--- 1.22/drivers/scsi/wd7000.c Sat Apr 26 10:28:29 2003
+++ edited/drivers/scsi/wd7000.c Sun Apr 27 09:12:47 2003
@@ -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);
/*
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] remove scsi_device proc printing from drivers
2003-04-27 16:56 [PATCH] remove scsi_device proc printing from drivers Christoph Hellwig
@ 2003-04-27 18:10 ` Patrick Mansfield
0 siblings, 0 replies; 2+ messages in thread
From: Patrick Mansfield @ 2003-04-27 18:10 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: James.Bottomley, linux-scsi
On Sun, Apr 27, 2003 at 06:56:28PM +0200, Christoph Hellwig wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-27 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-27 16:56 [PATCH] remove scsi_device proc printing from drivers Christoph Hellwig
2003-04-27 18:10 ` Patrick Mansfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox