Messages in this thread | | | Date | Thu, 12 Jul 2018 11:25:29 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] base: core: Remove WARN_ON from link dependencies check |
| |
On Thu, Jul 12, 2018 at 11:18:26AM +0200, Benjamin Gaignard wrote: > 2018-07-12 10:55 GMT+02:00 Greg KH <gregkh@linuxfoundation.org>:
> > Why would a link already exist that is asked to be created again? What > > code path causes this?
> It could happen that the link exist because a device use it parent as supplier. > That case has been describe by Marek in this thread (I forgot to add > it in the commit message, sorry): > https://lkml.org/lkml/2018/7/9/356
If we don't remove the warning then we'd need to have some way for generic code to check if a link that it wants to create exists already since if more than one thing adds links there's always a chance that two of them will come up with the same idea for a link. We could export device_is_dependent() and have them check that, or add a new flag that skips the check for example. This is however probably going to affect a reasonable percentage of potential users. [unhandled content-type:application/pgp-signature] | |