From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: gregkh@linuxfoundation.org, broonie@kernel.org, p.paillet@st.com,
linux-kernel@vger.kernel.org, m.szyprowski@samsung.com
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Subject: [PATCH] base: core: Remove WARN_ON from link dependencies check
Date: Thu, 12 Jul 2018 10:06:23 +0200 [thread overview]
Message-ID: <20180712080623.21203-1-benjamin.gaignard@st.com> (raw)
In some cases the link between between customer and supplier
already exist. Do not warn about already existing dependencies
because device_link_add() take care of this case.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
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);
--
2.15.0
next reply other threads:[~2018-07-12 8:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 8:06 Benjamin Gaignard [this message]
2018-07-12 8:55 ` [PATCH] base: core: Remove WARN_ON from link dependencies check Greg KH
2018-07-12 9:18 ` Benjamin Gaignard
2018-07-12 10:25 ` Mark Brown
2018-07-16 9:45 ` Rafael J. Wysocki
2018-07-13 16:14 ` Mark Brown
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=20180712080623.21203-1-benjamin.gaignard@st.com \
--to=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;
as well as URLs for NNTP newsgroup(s).