Re: [PATCH] ACPI: fan_attr: Replace sprintf with sysfs_emit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 4, 2025 at 2:40 AM Eslam Khafagy <eslam.medhat1993@xxxxxxxxx> wrote:
>
> Replace sprintf with sysfs_emit in function show_fine_grain_control in
> according to Documentation/filesystems/sysfs.rst.
>
> This patch builds on the fix proposed in patch:
> Message-ID 20250621055200.166361-1-abdelrahmanfekry375@xxxxxxxxx
>
> Signed-off-by: Eslam Khafagy <eslam.medhat1993@xxxxxxxxx>
> ---
>  drivers/acpi/fan_attr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/fan_attr.c b/drivers/acpi/fan_attr.c
> index 22d29ac2447c..f4e7f2351616 100644
> --- a/drivers/acpi/fan_attr.c
> +++ b/drivers/acpi/fan_attr.c
> @@ -67,7 +67,7 @@ static ssize_t show_fine_grain_control(struct device *dev, struct device_attribu
>         struct acpi_device *acpi_dev = container_of(dev, struct acpi_device, dev);
>         struct acpi_fan *fan = acpi_driver_data(acpi_dev);
>
> -       return sprintf(buf, "%d\n", fan->fif.fine_grain_ctrl);
> +       return sysfs_emit(buf, "%d\n", fan->fif.fine_grain_ctrl);
>  }
>
>  int acpi_fan_create_attributes(struct acpi_device *device)
> --

Applied as 6.17 material, thanks!





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux