Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3327756imm; Tue, 17 Jul 2018 02:59:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfPgvSAPbSALYgSt3idxtwb1rg2xtaWM77/AwKtzZ2KTyzP8K9CdSlzVlrM/hPyV+/0YDpS X-Received: by 2002:aa7:86d7:: with SMTP id h23-v6mr4653pfo.132.1531821568629; Tue, 17 Jul 2018 02:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531821568; cv=none; d=google.com; s=arc-20160816; b=Iq9/3ZbQ+w8XiT0Zrv8UBMZ+sOLXINjOAieYzI2B6+gzuwqpO7vzH9xD94a+9T0iVI /MA35IYqmCvfdD2HRDg6hgnk+mWZS+uFCBXjM8k+oHBUxM6XyC3JY9LOAYgbD0LwR3OI REy8HqaVZeIzJtzZSwAFS8L6iHYh+PzUewwQh6YjSuGFVOV8HSXvx8iYIE7mw28NYuhc k3AMQpnDoE28cXU/pQNdtE1VL45t8TlfpAi+ak2oUEXfruW9E64pHy/Jl7ZIS4Uw1hco JbzWubWdqgHSDNbUIP8gWBpRuMh9C3YzoyINQWlLXDsHmHOB5ZRHDnA85Y8OaAAqo9d4 qXHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=n7br5MZg2OWUHIxpG5GNZRZo56aZw20MjXuYt7tDB4g=; b=zgg++hB4vu9jDSYJOi2qKNSalFCQIi773jzCLTGgTbA5S/dNBJ6wRQF3txPhUYo0FN dOtRZdxbp7ITr3NZMuptsBHZUbDYBeAo2gk2jz5kZJNJWJNjCrWyXNZO7UIf5scARWXT jb/rYUWiTUQKdlnApO5RjzHuUusU2gunLiz8FT+ByZRlABkAPSffWveftZDTCayYLHI6 OiGAQsdcBUTyoAOvjDDA/XqhvUYuYbWrgFrPNRijFYHs53SBDBZAum2DHgLbMWMKsmBI sZWMQyEUh2V2OG4B2EtG9r3jK7/q1G6zjPWJv2f5Q9B6qk7vaRnBcW0UMg8rMA8fxTWC nkUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16-v6si477802pgu.487.2018.07.17.02.59.13; Tue, 17 Jul 2018 02:59:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729952AbeGQKa1 (ORCPT + 99 others); Tue, 17 Jul 2018 06:30:27 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:65190 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729655AbeGQKa1 (ORCPT ); Tue, 17 Jul 2018 06:30:27 -0400 Received: from 79.184.255.17.ipv4.supernova.orange.pl (79.184.255.17) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 42182fbe77285237; Tue, 17 Jul 2018 11:58:37 +0200 From: "Rafael J. Wysocki" To: Benjamin Gaignard Cc: gregkh@linuxfoundation.org, broonie@kernel.org, p.paillet@st.com, linux-kernel@vger.kernel.org, m.szyprowski@samsung.com, Benjamin Gaignard Subject: Re: [PATCH v3] base: core: Remove WARN_ON from link dependencies check Date: Tue, 17 Jul 2018 11:56:59 +0200 Message-ID: <4236937.TuBsddNVuo@aspire.rjw.lan> In-Reply-To: <20180716113744.13300-1-benjamin.gaignard@st.com> References: <20180716113744.13300-1-benjamin.gaignard@st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 16, 2018 1:37:44 PM CEST Benjamin Gaignard wrote: > In some cases the link between between customer and supplier > already exist, for example when a device use its parent as a supplier. > Do not warn about already existing dependencies because device_link_add() > takes care of this case. > > Link: http://lkml.kernel.org/r/20180709111753eucas1p1f32e66fb2f7ea3216097cd72a132355d~-rzycA5Rg0378203782eucas1p1C@eucas1p1.samsung.com > > Reported-by: Marek Szyprowski > Reviewed-by: Mark Brown > Signed-off-by: Benjamin Gaignard That's better. :-) Reviewed-by: Rafael J. Wysocki > --- > 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); >