Skip to content

Commit

Permalink
s390/sclp: convert to use sysfs_emit()
Browse files Browse the repository at this point in the history
Use sysfs_emit() for all sclp sysfs show functions, which is the
current standard way to generate output strings.

Reviewed-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Alexander Gordeev <[email protected]>
  • Loading branch information
hcahca authored and Alexander Gordeev committed Nov 29, 2022
1 parent 2473be4 commit a086c53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/s390/char/sclp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,21 +1200,21 @@ static struct notifier_block sclp_reboot_notifier = {

static ssize_t con_pages_show(struct device_driver *dev, char *buf)
{
return sprintf(buf, "%i\n", sclp_console_pages);
return sysfs_emit(buf, "%i\n", sclp_console_pages);
}

static DRIVER_ATTR_RO(con_pages);

static ssize_t con_drop_show(struct device_driver *dev, char *buf)
{
return sprintf(buf, "%i\n", sclp_console_drop);
return sysfs_emit(buf, "%i\n", sclp_console_drop);
}

static DRIVER_ATTR_RO(con_drop);

static ssize_t con_full_show(struct device_driver *dev, char *buf)
{
return sprintf(buf, "%lu\n", sclp_console_full);
return sysfs_emit(buf, "%lu\n", sclp_console_full);
}

static DRIVER_ATTR_RO(con_full);
Expand Down

0 comments on commit a086c53

Please sign in to comment.