public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: gregkh@linuxfoundation.org, broonie@kernel.org, p.paillet@st.com,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	Benjamin Gaignard <benjamin.gaignard@st.com>
Subject: Re: [PATCH v2] base: core: Remove WARN_ON from link dependencies check
Date: Mon, 16 Jul 2018 12:07:20 +0200	[thread overview]
Message-ID: <1753469.EDefOSO2YU@aspire.rjw.lan> (raw)
In-Reply-To: <20180716095952.22202-1-benjamin.gaignard@st.com>

On Monday, July 16, 2018 11:59:52 AM CEST Benjamin Gaignard wrote:
> In some cases the link between between customer and supplier
> already exist, for example when a device use it parent as supplier [1].

I think this should be "its parent as a supplier".

> Do not warn about already existing dependencies because device_link_add()
> take care of this case.

"device_link_add() takes care of"

> [1] https://lkml.org/lkml/2018/7/9/356

There is the Link: tag for links and it is better to not use lkml.org
as it is not reliable enough.  You can use lore.kernel.org/lkml/ instead.

> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  drivers/base/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index df3e1a44707a..fcdc17f0f349 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -105,7 +105,7 @@ static int device_is_dependent(struct device *dev, void *target)
>  	struct device_link *link;
>  	int ret;
>  
> -	if (WARN_ON(dev == target))
> +	if (dev == target)
>  		return 1;
>  
>  	ret = device_for_each_child(dev, target, device_is_dependent);
> @@ -113,7 +113,7 @@ static int device_is_dependent(struct device *dev, void *target)
>  		return ret;
>  
>  	list_for_each_entry(link, &dev->links.consumers, s_node) {
> -		if (WARN_ON(link->consumer == target))
> +		if (link->consumer == target)
>  			return 1;
>  
>  		ret = device_is_dependent(link->consumer, target);
> 



  reply	other threads:[~2018-07-16 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16  9:59 [PATCH v2] base: core: Remove WARN_ON from link dependencies check Benjamin Gaignard
2018-07-16 10:07 ` Rafael J. Wysocki [this message]
2018-07-16 10:27   ` Greg KH
2018-07-16 10:40     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1753469.EDefOSO2YU@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=benjamin.gaignard@linaro.org \
    --cc=benjamin.gaignard@st.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=p.paillet@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox