lkml.org 
[lkml]   [2023]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 06/11] driver core: fw_devlink: Allow marking a fwnode link as being part of a cycle
On Fri, Jan 27, 2023 at 1:33 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Jan 26, 2023 at 04:11:33PM -0800, Saravana Kannan wrote:
> > To improve detection and handling of dependency cycles, we need to be
> > able to mark fwnode links as being part of cycles. fwnode links marked
> > as being part of a cycle should not block their consumers from probing.
>
> ...
>
> > + list_for_each_entry(link, &fwnode->suppliers, c_hook) {
> > + if (link->flags & FWLINK_FLAG_CYCLE)
> > + continue;
> > + return link->supplier;
>
> Hmm...

Thanks!

>
> if (!(link->flags & FWLINK_FLAG_CYCLE))
> return link->supplier;
>
> ?
>
> > + }
> > +
> > + return NULL;
>
> ...
>
> > - if (dev->fwnode && !list_empty(&dev->fwnode->suppliers) &&
> > - !fw_devlink_is_permissive()) {
> > - sup_fw = list_first_entry(&dev->fwnode->suppliers,
> > - struct fwnode_link,
> > - c_hook)->supplier;
> > + sup_fw = fwnode_links_check_suppliers(dev->fwnode);
>
> dev_fwnode() ?
>
> ...
>
> > - val = !list_empty(&dev->fwnode->suppliers);
> > + mutex_lock(&fwnode_link_lock);
> > + val = !!fwnode_links_check_suppliers(dev->fwnode);
>
> Ditto?

Similar response as Patch 1 and Patch 4.


-Saravana

\
 
 \ /
  Last update: 2023-03-27 00:00    [W:0.111 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site