diff options
author | Qing Wang <wangqing@vivo.com> | 2021-10-13 05:24:50 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-10-13 20:02:18 +0200 |
commit | d47e983e4f612856c860ae04db054ebcf4a333c3 (patch) | |
tree | f6ca4bec83a2236f7cafc8c755f4d65c5a30c659 /drivers/acpi/acpi_lpss.c | |
parent | ACPI: Update information in MAINTAINERS (diff) | |
download | linux-d47e983e4f612856c860ae04db054ebcf4a333c3.tar.xz linux-d47e983e4f612856c860ae04db054ebcf4a333c3.zip |
ACPI: replace snprintf() in "show" functions with sysfs_emit()
coccicheck complains about the use of snprintf() in sysfs "show"
functions:
Fix the coccicheck warning:
WARNING: use scnprintf or sprintf.
so use sysfs_emit() instead of it where applicable.
Signed-off-by: Qing Wang <wangqing@vivo.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 30b1f511c2af..07447213a752 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -750,7 +750,7 @@ static ssize_t lpss_ltr_show(struct device *dev, struct device_attribute *attr, if (ret) return ret; - return snprintf(buf, PAGE_SIZE, "%08x\n", ltr_value); + return sysfs_emit(buf, "%08x\n", ltr_value); } static ssize_t lpss_ltr_mode_show(struct device *dev, |