Re: [PATCH v2 5/6] asus-wmi: Convert all attr-show to use sysfs_emit

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

 



On Mon, Aug 8, 2022 at 5:08 AM Luke D. Jones <luke@xxxxxxxxxx> wrote:
>
> This changes all *_show attributes in asus-wmi.c to use sysfs_emit

We refer to functions as func().

> instead of the older method of writing to the output buffer manually.

...

> -       return sprintf(buf, "%d\n", value < 0 ? -1 : value*100);
> +       return sysfs_emit(buf, "%d\n", value < 0 ? -1 : value*100);

While at it, put spaces around *: 'value * 100'.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux