Skip to content

Commit

Permalink
scsi: megaraid: Convert sysfs snprintf() to sysfs_emit()
Browse files Browse the repository at this point in the history
Fix up sysfs show entries to use sysfs_emit()

Link: https://lore.kernel.org/r/20220831140325.396295-1-zhangxuezhi3@gmail.com
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Xuezhi Zhang authored and Martin K. Petersen committed Sep 16, 2022
1 parent 59f4e39 commit 68a97fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/megaraid/megaraid_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -3979,7 +3979,7 @@ megaraid_mbox_app_hndl_show(struct device *dev, struct device_attribute *attr, c

app_hndl = mraid_mm_adapter_app_handle(adapter->unique_id);

return snprintf(buf, 8, "%u\n", app_hndl);
return sysfs_emit(buf, "%u\n", app_hndl);
}


Expand Down Expand Up @@ -4048,7 +4048,7 @@ megaraid_mbox_ld_show(struct device *dev, struct device_attribute *attr, char *b
}
}

return snprintf(buf, 36, "%d %d %d %d\n", scsi_id, logical_drv,
return sysfs_emit(buf, "%d %d %d %d\n", scsi_id, logical_drv,
ldid_map, app_hndl);
}

Expand Down

0 comments on commit 68a97fe

Please sign in to comment.