[PATCH] arcmsr: fix up sysfs values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The sysfs files in arcmsr are non-standard in that they aren't simple
filename value pairs, the values actually contain preceeding text which
would have to be parsed.  The idea of sysfs files is that the file name
is the description and the contents is a simple value.

Fix up arcmsr to conform to this standard.

James

diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c
index 0459f41..13b60c1 100644
--- a/drivers/scsi/arcmsr/arcmsr_attr.c
+++ b/drivers/scsi/arcmsr/arcmsr_attr.c
@@ -276,7 +276,7 @@ arcmsr_free_sysfs_attr(struct AdapterCon
 static ssize_t
 arcmsr_attr_host_driver_version(struct class_device *cdev, char *buf) {
 	return snprintf(buf, PAGE_SIZE,
-			"ARCMSR: %s\n",
+			"%s\n",
 			ARCMSR_DRIVER_VERSION);
 }
 
@@ -285,7 +285,7 @@ arcmsr_attr_host_driver_posted_cmd(struc
 	struct Scsi_Host *host = class_to_shost(cdev);
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 	return snprintf(buf, PAGE_SIZE,
-			"Current commands posted:     %4d\n",
+			"%4d\n",
 			atomic_read(&acb->ccboutstandingcount));
 }
 
@@ -294,7 +294,7 @@ arcmsr_attr_host_driver_reset(struct cla
 	struct Scsi_Host *host = class_to_shost(cdev);
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 	return snprintf(buf, PAGE_SIZE,
-			"SCSI Host Resets:            %4d\n",
+			"%4d\n",
 			acb->num_resets);
 }
 
@@ -303,7 +303,7 @@ arcmsr_attr_host_driver_abort(struct cla
 	struct Scsi_Host *host = class_to_shost(cdev);
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 	return snprintf(buf, PAGE_SIZE,
-			"SCSI Aborts/Timeouts:        %4d\n",
+			"%4d\n",
 			acb->num_aborts);
 }
 
@@ -312,7 +312,7 @@ arcmsr_attr_host_fw_model(struct class_d
     struct Scsi_Host *host = class_to_shost(cdev);
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 	return snprintf(buf, PAGE_SIZE,
-			"Adapter Model: %s\n",
+			"%s\n",
 			acb->firm_model);
 }
 
@@ -322,7 +322,7 @@ arcmsr_attr_host_fw_version(struct class
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 
 	return snprintf(buf, PAGE_SIZE,
-			"Firmware Version:  %s\n",
+			"%s\n",
 			acb->firm_version);
 }
 
@@ -332,7 +332,7 @@ arcmsr_attr_host_fw_request_len(struct c
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 
 	return snprintf(buf, PAGE_SIZE,
-			"Reguest Lenth: %4d\n",
+			"%4d\n",
 			acb->firm_request_len);
 }
 
@@ -342,7 +342,7 @@ arcmsr_attr_host_fw_numbers_queue(struct
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 
 	return snprintf(buf, PAGE_SIZE,
-			"Numbers of Queue: %4d\n",
+			"%4d\n",
 			acb->firm_numbers_queue);
 }
 
@@ -352,7 +352,7 @@ arcmsr_attr_host_fw_sdram_size(struct cl
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 
 	return snprintf(buf, PAGE_SIZE,
-			"SDRAM Size: %4d\n",
+			"%4d\n",
 			acb->firm_sdram_size);
 }
 
@@ -362,7 +362,7 @@ arcmsr_attr_host_fw_hd_channels(struct c
 	struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
 
 	return snprintf(buf, PAGE_SIZE,
-			"Hard Disk Channels: %4d\n",
+			"%4d\n",
 			acb->firm_hd_channels);
 }
 


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux