Re: [PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-07 Thread Krzysztof Wilczyński
Hello, [...] > > There exist the sysfs_update_groups(), but the BAR resource sysfs objects > > are currently, at least not yet, added to any attribute group. > > then maybe they should be added to one :) Yeah. There is work in progress that will take care of some of this. Krzysztof

Re: [PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-06 Thread Greg Kroah-Hartman
On Thu, Nov 07, 2024 at 05:05:13AM +0900, Krzysztof Wilczyński wrote: > Hello, > > > Several drivers need to dynamically calculate the size of an binary > > attribute. Currently this is done by assigning attr->size from the > > is_bin_visible() callback. > > > > This has drawbacks: > > * It is no

Re: [PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-06 Thread Armin Wolf
Am 03.11.24 um 18:03 schrieb Thomas Weißschuh: Several drivers need to dynamically calculate the size of an binary attribute. Currently this is done by assigning attr->size from the is_bin_visible() callback. Hi, i really like your idea of introducing this new callback, it will be very useful

Re: [PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-06 Thread Krzysztof Wilczyński
Hello, > Several drivers need to dynamically calculate the size of an binary > attribute. Currently this is done by assigning attr->size from the > is_bin_visible() callback. > > This has drawbacks: > * It is not documented. > * A single attribute can be instantiated multiple times, overwriting t

Re: [PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-05 Thread Bjorn Helgaas
On Sun, Nov 03, 2024 at 05:03:31PM +, Thomas Weißschuh wrote: > Several drivers need to dynamically calculate the size of an binary > attribute. Currently this is done by assigning attr->size from the > is_bin_visible() callback. s/an binary/a binary/ > This has drawbacks: > * It is not docum

[PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-03 Thread Thomas Weißschuh
Several drivers need to dynamically calculate the size of an binary attribute. Currently this is done by assigning attr->size from the is_bin_visible() callback. This has drawbacks: * It is not documented. * A single attribute can be instantiated multiple times, overwriting the shared size field