Re: [PATCH] base: core: Remove WARN_ON from link dependencies check

From: Mark Brown
Date: Thu Jul 12 2018 - 06:25:35 EST


On Thu, Jul 12, 2018 at 11:18:26AM +0200, Benjamin Gaignard wrote:
> 2018-07-12 10:55 GMT+02:00 Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>:

> > 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.

Attachment: signature.asc
Description: PGP signature