@@ -258,8 +258,7 @@ static ssize_t
arcmsr_attr_host_driver_version(struct device *dev,
struct device_attribute *attr, char *buf)
{
- return snprintf(buf, PAGE_SIZE,
- "%s\n",
+ return sysfs_emit(buf, "%s\n",
ARCMSR_DRIVER_VERSION);
}
@@ -270,8 +269,7 @@ arcmsr_attr_host_driver_posted_cmd(struct device *dev,
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
atomic_read(&acb->ccboutstandingcount));
}
@@ -282,8 +280,7 @@ arcmsr_attr_host_driver_reset(struct device *dev,
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
acb->num_resets);
}
@@ -294,8 +291,7 @@ arcmsr_attr_host_driver_abort(struct device *dev,
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
acb->num_aborts);
}
@@ -306,8 +302,7 @@ arcmsr_attr_host_fw_model(struct device *dev, struct device_attribute *attr,
struct Scsi_Host *host = class_to_shost(dev);
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%s\n",
+ return sysfs_emit(buf, "%s\n",
acb->firm_model);
}
@@ -319,8 +314,7 @@ arcmsr_attr_host_fw_version(struct device *dev,
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%s\n",
+ return sysfs_emit(buf, "%s\n",
acb->firm_version);
}
@@ -332,8 +326,7 @@ arcmsr_attr_host_fw_request_len(struct device *dev,
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
acb->firm_request_len);
}
@@ -345,8 +338,7 @@ arcmsr_attr_host_fw_numbers_queue(struct device *dev,
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
acb->firm_numbers_queue);
}
@@ -358,8 +350,7 @@ arcmsr_attr_host_fw_sdram_size(struct device *dev,
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
acb->firm_sdram_size);
}
@@ -371,8 +362,7 @@ arcmsr_attr_host_fw_hd_channels(struct device *dev,
struct AdapterControlBlock *acb =
(struct AdapterControlBlock *) host->hostdata;
- return snprintf(buf, PAGE_SIZE,
- "%4d\n",
+ return sysfs_emit(buf, "%4d\n",
acb->firm_hd_channels);
}