Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp478188imm; Mon, 9 Jul 2018 05:28:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdtN7i2EuVlquK5yWuoTHoO38t0x4j74UMQKGq11Qs5PiakQmZeFq/OZGyVLojBrjQQczth X-Received: by 2002:a62:1489:: with SMTP id 131-v6mr21287903pfu.159.1531139320480; Mon, 09 Jul 2018 05:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531139320; cv=none; d=google.com; s=arc-20160816; b=eEnP84WsNByKDWgEE105BuJ1dZJYuWP0LOabFA6CTRdAESS8SkzvW8hM5tvIWMnZfJ fUV80yom7LiKO3Ur+PJyC2a1D3AUjGKjSWn2q7BTxMniO3v4eX7dQrkhd7o9Cx/c2K/V hS4j9SOonXl/AUYFYHAc8c4yEiCTChxMLowZD9VUeLY/CFGxiSi8gPaBL7WXDONuPryT cSEIzpaHfF4Fh6x7F4bdiN+Csn3NRgAKbhYGzOJ5+vNZROFNKZ+WuUwpYEwbmax9du8G Vnnt0npnJD5oEAYe3KDE/6ZXBY3pORTQrswy3yjNG8M0W+0bQut88mq1O0AR9+hhV+4y AmZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=8e6hn58Wa/Nmzrdryc+6YUIQi8pEGWR5YKra7BqsYqk=; b=LR9zYYsnr2cLCYP0W4JThUzt+tp3D2Ntaaoxr9V6hCLvTNjv1ln8xMRiYgWDUAcqD4 zgt4offOcVxbP3jzQIsXqWX+MrAUtQ5WRlG9Q2CHh0T9kF2/wAG3o0alH3Yt4V0ecst0 VPcMQscucAKCSs+/NUrajq6zr5D4Q9Gk3EextOtwTLNZT0gbhw21g8hFuRx5VJ0pnBcH V5kj6LbjP5dsB8l5SJK4L6r02LCIJIoseZveYYKClVz2+w21itVXK0T3P5n1YQyKiCK8 IhCLtxwIpkwYhiUtysfHQsfXfdVJGUPed7GO4cb/+2bLIehVrz/W/tK6HFU6dTjvMbZL PbfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=TF1MGX3C; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23-v6si13983366pgx.323.2018.07.09.05.28.25; Mon, 09 Jul 2018 05:28:40 -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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=TF1MGX3C; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933213AbeGIM0R (ORCPT + 99 others); Mon, 9 Jul 2018 08:26:17 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:51034 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932755AbeGIM0N (ORCPT ); Mon, 9 Jul 2018 08:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8e6hn58Wa/Nmzrdryc+6YUIQi8pEGWR5YKra7BqsYqk=; b=TF1MGX3CDV9rMQqBSLbhV8o3t 4qYElq+srLeL1A0yIYW8Fx6RgXJsGL2j/kTmNfKAjuPwW/PNI8OO2mNy63Hk6dLv4U1EBbxPFSTEv n/liZ2t5ZZoenNGwL+3GHdm4X46jMPQSX3slZFq0PqDmYnTcepfrnU6CqMOwF24Th+Lx0=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcVF3-0003kB-3h; Mon, 09 Jul 2018 12:26:09 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fcVF2-00005l-8R; Mon, 09 Jul 2018 13:26:08 +0100 Date: Mon, 9 Jul 2018 13:26:08 +0100 From: Mark Brown To: Benjamin Gaignard Cc: Marek Szyprowski , pascal paillet , "gregkh@linuxfoundation.org" , "lgirdwood@gmail.com" , "linux-kernel@vger.kernel.org" , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , rafael.j.wysocki@intel.co Subject: Re: Applied "regulator: core: Link consumer with regulator driver" to the regulator tree Message-ID: <20180709122608.GE16082@sirena.org.uk> References: <20180709111753eucas1p1f32e66fb2f7ea3216097cd72a132355d~-rzycA5Rg0378203782eucas1p1C@eucas1p1.samsung.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wTWi5aaYRw9ix9vO" Content-Disposition: inline In-Reply-To: X-Cookie: Falling rock. User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wTWi5aaYRw9ix9vO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 09, 2018 at 02:13:35PM +0200, Benjamin Gaignard wrote: > 2018-07-09 13:17 GMT+02:00 Marek Szyprowski : > > ------------[ cut here ]------------ > > WARNING: CPU: 1 PID: 1 at drivers/base/core.c:108 > > device_is_dependent+0xa4/0xb4 > > Modules linked in: > > CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.18.0-rc3-next-20180706 #112 > > It looks that some more checks have to be done before adding a link between > > regulator consumer and regulator driver, because it is not that uncommon > > that > > regulator consumer shares the parent device with regulator provider. > Each time device_is_dependent() will return 1 we have a warn_on. > It is strange since returning 1 is well documented on function description. > I don't know if we can safely remove the warn_on or if their is a good > reason to keep it. > Rafael what do you think about that ? It's trying to tell you that there's probably a higher level bug if you're adding a link from a device to itself. That's not super unreasonable, though it is going to mean that every bit of generic code like this adding links is going to have to add checks (or we have to downgrade or make optional the WARN_ON). --wTWi5aaYRw9ix9vO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltDVF8ACgkQJNaLcl1U h9B4fAf/f2M9nozSlq4ot+kHdRSov7AokXfHzhx1FnMeXpq85njfR+4zhazTZ8Aj 9ZGGKqopnmNY1GDaPTvSnSeK2PlXceWlBPDxtQ8Vqd0Ib2hDUWO6zcAmR5aJhJz6 z6KxW/fZxzNO6NzvE/ZDxyEYtBEoMM6Ek3lyoMDqVoqwhrGCjIJfUyKYVkYnbi3C dUzHOslxY9xklS/RRPrGDcpoQL69d35K6CT2OY2EXzkkq/9ktDVcOBcm4GiPfdMZ T9JMFlFNi59ygkG/kdATR+SVdb+QEshdTP7u7IDTnlgnc9Pik3TcoLnTFXV8B5yj FkJl0hudWijqRhLYx+8x7aQ0vlkq5w== =OZHh -----END PGP SIGNATURE----- --wTWi5aaYRw9ix9vO--