Re: [PATCH] kheaders: Simplify attribute through sysfs_bin_attr_simple_read()

From: Masahiro Yamada
Date: Sat Dec 21 2024 - 00:00:01 EST


On Mon, Dec 16, 2024 at 1:50 AM Thomas Weißschuh <linux@xxxxxxxxxxxxxx> wrote:
>
> The utility function from the sysfs core is sufficient to implement this
> attribute. Make use of it.
>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> ---
> __BIN_ATTR() is used over the normal struct initializer because it is
> shorter and can also handle the transition to const struct bin_attr

__BIN_ATTR_SIMPLE_RO() is even shorter.





--
Best Regards
Masahiro Yamada