@@ -3538,7 +3538,7 @@ static ssize_t pmcraid_show_log_level(
struct Scsi_Host *shost = class_to_shost(dev);
struct pmcraid_instance *pinstance =
(struct pmcraid_instance *)shost->hostdata;
- return snprintf(buf, PAGE_SIZE, "%d\n", pinstance->current_log_level);
+ return sysfs_emit(buf, "%d\n", pinstance->current_log_level);
}
/**
@@ -3599,8 +3599,7 @@ static ssize_t pmcraid_show_drv_version(
char *buf
)
{
- return snprintf(buf, PAGE_SIZE, "version: %s\n",
- PMCRAID_DRIVER_VERSION);
+ return sysfs_emit(buf, "version: %s\n", PMCRAID_DRIVER_VERSION);
}
static struct device_attribute pmcraid_driver_version_attr = {
@@ -3632,9 +3631,9 @@ static ssize_t pmcraid_show_adapter_id(
u32 adapter_id = pci_dev_id(pinstance->pdev);
u32 aen_group = pmcraid_event_family.id;
- return snprintf(buf, PAGE_SIZE,
- "adapter id: %d\nminor: %d\naen group: %d\n",
- adapter_id, MINOR(pinstance->cdev.dev), aen_group);
+ return sysfs_emit(buf,
+ "adapter id: %d\nminor: %d\naen group: %d\n",
+ adapter_id, MINOR(pinstance->cdev.dev), aen_group);
}
static struct device_attribute pmcraid_adapter_id_attr = {