Received: by 10.192.165.156 with SMTP id m28csp683687imm; Fri, 13 Apr 2018 06:09:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/uM0MgMz/FYFK8V/5dorFIVJv2gqS5By8UQXpSEy5TWgrfNbxalG6EkuzMC7BDaedvtjnj X-Received: by 10.101.70.8 with SMTP id v8mr4103676pgq.336.1523624986713; Fri, 13 Apr 2018 06:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523624986; cv=none; d=google.com; s=arc-20160816; b=TUxDI3QGsHd1DHkJPy0KpYeaicDm4GYTMrS7cfFBJWXy3cMxrf8egM9TDQSgzDlxN7 F5wesVYmTG3O2yTgMd/4z8/eFtvOFxT7vKqykTL9FL61qov+QxkiCymVPcCiTTV+lJ33 OfEA+VB7iBhrZaFMpiY2qU4xgj0w5Kfl4XbVG3FG/B1piLIU1HEUcnj3TN+0BxV54nP3 GSK7Kt9/h7AOrjlyGVf57DudNRjO6br0xP2SWXlmBuWLiODBELsffW+kdLoEb/VbxmY8 o6s7bzj26qk7KoEk/WlSoqw7cT2ONl/+IislvfuMWNZR5Awlb6Duh0iToeNt0uYG/BBb lzGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=u28wpF4ocSzARefAERRzloTNm+Ulb7oDEvCzI7t5/go=; b=n7bXfRqcas9n6AoZ7tseP3d2oCo5aSb+jFi0IHePdigEGojRIjSYicFFxmJZJtGnYy RYjSEx+5Xnug2YN3M+QsQkmyiaJTQ5GMsuILIcD7PcrA101OCKEY4agf8Gmlrhyxreho uUFq7L77Z8cFiiksuPzDptkAxRQS5qz8xKhRZCYMl4YOM7HYlMBS4ibl87lvP6XY5hUq dEhpn/RS2RUbgN1cgGaPCTo9adSjqnRUVutYSQujRAXlCsg2H16EIx/C0uxVpqgtJJ6j AsQ6f050VSpejUCwLCiDmOVta3jD0JQxWKpUR7vZm/kAchRMFNtPs3TwHz+jPkXfnP9b ReaQ== 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 y73-v6si5467812plh.393.2018.04.13.06.09.32; Fri, 13 Apr 2018 06:09:46 -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 S1754117AbeDMNIO (ORCPT + 99 others); Fri, 13 Apr 2018 09:08:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:43996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754003AbeDMNIM (ORCPT ); Fri, 13 Apr 2018 09:08:12 -0400 Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82C8A2178E; Fri, 13 Apr 2018 13:08:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82C8A2178E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qk0-f176.google.com with SMTP id c188so8993231qkg.2; Fri, 13 Apr 2018 06:08:11 -0700 (PDT) X-Gm-Message-State: ALQs6tDGfxThUpFtY/LATNNXP59oY1sU+UGd8wKWpJoF0s9ZfN/81ELF 4Hx1srsCQxmb/V6IzieSyBgGdID2Vf44K7ElRg== X-Received: by 10.55.116.71 with SMTP id p68mr4290912qkc.29.1523624890692; Fri, 13 Apr 2018 06:08:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.213.166 with HTTP; Fri, 13 Apr 2018 06:07:50 -0700 (PDT) In-Reply-To: References: From: Rob Herring Date: Fri, 13 Apr 2018 08:07:50 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: Don't create platform device for OPP tables To: Viresh Kumar Cc: Frank Rowand , Vincent Guittot , "linux-kernel@vger.kernel.org" , Stephen Boyd , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 10, 2018 at 4:05 AM, Viresh Kumar wrote: > The OPP tables are present as separate nodes, whose phandle is used in > the "operating-points-v2" property of devices. Currently the OF core > creates a platform device for the OPP table unconditionally, which is > not used by any kernel code. > > Skip creating OPP table platform devices. > > Reported-by: Stephen Boyd > Signed-off-by: Viresh Kumar > --- > drivers/of/platform.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > index c00d81dfac0b..aaae5d90433d 100644 > --- a/drivers/of/platform.c > +++ b/drivers/of/platform.c > @@ -356,6 +356,12 @@ static int of_platform_bus_create(struct device_node *bus, > return 0; > } > > + /* OPP tables have separate nodes, but we don't want devices for them */ > + if (unlikely(of_device_is_compatible(bus, "operating-points-v2"))) { Can you make this a match table instead. I could imagine we may have some other cases to add. > + pr_debug("%s() - skipping OPP node %pOF\n", __func__, bus); > + return 0; > + } > + > if (of_node_check_flag(bus, OF_POPULATED_BUS)) { > pr_debug("%s() - skipping %pOF, already populated\n", > __func__, bus); > -- > 2.15.0.194.g9af6a3dea062 >