lkml.org 
[lkml]   [2022]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 4/5] soundwire: sysfs: remove sdw_slave_sysfs_init()
    From


    > diff --git a/drivers/soundwire/sysfs_slave_dpn.c b/drivers/soundwire/sysfs_slave_dpn.c
    > index c4b6543c09fd..a3fb380ee519 100644
    > --- a/drivers/soundwire/sysfs_slave_dpn.c
    > +++ b/drivers/soundwire/sysfs_slave_dpn.c
    > @@ -283,6 +283,9 @@ int sdw_slave_sysfs_dpn_init(struct sdw_slave *slave)
    > int ret;
    > int i;
    >
    > + if (!slave->prop.source_ports && !slave->prop.sink_ports)
    > + return 0;
    > +
    > mask = slave->prop.source_ports;
    > for_each_set_bit(i, &mask, 32) {
    > ret = add_all_attributes(&slave->dev, i, 1);

    I am struggling with this one since the driver is still adding
    attributes manually. You mentioned in the other thread that

    "
    That's what the is_visible() callback is for in the groups structure,
    you determine if the attribute is visable or not at runtime, you don't
    rely on the driver itself to add/remove attributes, that does not scale
    and again, is racy.
    "

    I interpret that as "there's still a race here", no?

    \
     
     \ /
      Last update: 2022-07-29 17:01    [W:6.540 / U:1.648 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site