Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2149727imm; Mon, 16 Jul 2018 03:09:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfNwvgIeLcjkYyh77fR++DTB4RyLEuNaKW7PC/ZCLrBCVlW6jZslQGKKGsdWOqCLNYZqvbR X-Received: by 2002:a63:8f53:: with SMTP id r19-v6mr14768368pgn.17.1531735785458; Mon, 16 Jul 2018 03:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531735785; cv=none; d=google.com; s=arc-20160816; b=WaHHvOKLt2lXBixTcKPa4PGWoMSFPK0poIRSFkp8G8adNuXuhh5rRBi4HKuA3OkJpg QW14gxxDm+PW2M4zkildndI8mIvg7RnKOF1RTYHKdo5brqtnuSqly+KEwP9NJxE0CzVL diSaYu2LW2Ze+yBrGW/V0kjlLJ7IQN4z8RxHYGOkLXiSTSO1OH0abWkEmTwxlh2VTXoc oY/rcs3YCJvhy0anlrM+F5qYUQ8dG3GFC0XNfKHhkSD/848eM8sPHhRmhuX3pOQEQ2Fk Uu+Bs2oEFCzXl2FootichMhy4bcHV6dLV32uhj5+CGgvZ+JCV6LpgeDO/RheE1AXuq8a vncw== 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=hTq1bZR3elqWb8XexHgrlmWzGwa523tdqys20/pTZjI=; b=Ph0TVbAwaakUMI2EMjXRibdqUojSNmHu1dF7uDDbeHLddNf3GcObD+hUIQjoXC24wo 990RuPZL2W6muo8+aX2mMxkqeaxyQKfsges4h0uK6Dis/myMmevDXv7qsUERFZ2KtyOu 78dXc574lHK3fCh2H1NBcGFtmt7G6cVI/CcpJrOcA16BOtm2OdsCNzqzWPhrDiuyUuO8 9aFeZbw/tFk3AZK85s7YSepKdlUxGRAz406DqBYXjzcNaH1UHWxz21LLgF9qPytP1sba jyx4YCZ30LG8kEiXfmjGwBTfYY6wLwbqZr6jzzDkJRpsN9gxLvvhgJNsvi5pYllSJJBM ctPw== 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 85-v6si32203581pfm.264.2018.07.16.03.09.30; Mon, 16 Jul 2018 03:09:45 -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 S1728742AbeGPKfh (ORCPT + 99 others); Mon, 16 Jul 2018 06:35:37 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:50829 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727494AbeGPKfh (ORCPT ); Mon, 16 Jul 2018 06:35:37 -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 230f7a75d7260690; Mon, 16 Jul 2018 12:08:56 +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 v2] base: core: Remove WARN_ON from link dependencies check Date: Mon, 16 Jul 2018 12:07:20 +0200 Message-ID: <1753469.EDefOSO2YU@aspire.rjw.lan> In-Reply-To: <20180716095952.22202-1-benjamin.gaignard@st.com> References: <20180716095952.22202-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 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 > Reviewed-by: Mark Brown > Signed-off-by: Benjamin Gaignard > --- > 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); >