Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4623731ybh; Tue, 6 Aug 2019 15:05:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH+GhaxbJvcgawTRBkUwXuPAMDDwV9M6jvuF5tlJoKOH7ubqmNMA24J9HQVVQWzfn7RYK7 X-Received: by 2002:a17:902:7246:: with SMTP id c6mr4977786pll.203.1565129136470; Tue, 06 Aug 2019 15:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565129136; cv=none; d=google.com; s=arc-20160816; b=rXXgc9Eh/M3ShLuztA7p2RSxN2aL/rNXmJTU2tIP/YBm8ztHcs0u+Wk3E8IzqPHkiz Azyj1bMMaJd0WkIl5dBImpl/5vVXIoEE4cCQC642dXHdbIX2Qb0onpfH+BUx12Y+3+gn jz5NhbgLowZDFcS5iwqGujCG8a6AMLuJJnO9cMzskkO2wU6/VQYmGEXvM2Xtjh2GJPTj rLqUWXt7G60aaVGInhblx//ZQVQhmXcvXgWBi5HqrQJSDQgFiqTapJYGJf4tmrIsIWeZ rLNuxjGGlsdOWYKapT9+AbArxZft2LJ6zAzFWA1oDjZBvLW5BZPa+parVO8Rv+SBc7E9 wZ1A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=QfnP4WFLi3j9Pcefb2omV5XrdW/cAbsj/88MkL4fbvI=; b=ZuemzPk73j2t+GTu2ycfJ4jq678B1Ynx+EgmUmhPc0mKj4jd92NrMM9GH5CgnvvzIN V4xfN5l+gtzn7lWaemd8oaD8CdtoyPCyK9AlnCL2KLwWRfauw+vwac4mpVG7iCgngb8V 1CDY8a80ttnuoJHYtUmWokzozt8yx5ZLTJ0ZTUshFUXyFCYzQEYAMRNL5T1oB4+42B+v cXQmU549fUePOfIvHm//ga8KxDfqw1avLBH5KMXY6VtLG/evpyo92oQB5hvaj1q3w51G bee5uJIZ6IfqV8hHQcX1Nr6+BtO1I9qrHeU+y/zkZI10jCS0tIB0Dm60aHwdqq5BAHIg Lscg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Gq51WFCg; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h186si49736207pge.110.2019.08.06.15.05.20; Tue, 06 Aug 2019 15:05:36 -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=pass header.i=@google.com header.s=20161025 header.b=Gq51WFCg; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726923AbfHFWEj (ORCPT + 99 others); Tue, 6 Aug 2019 18:04:39 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:45214 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfHFWEj (ORCPT ); Tue, 6 Aug 2019 18:04:39 -0400 Received: by mail-oi1-f194.google.com with SMTP id m206so68949567oib.12 for ; Tue, 06 Aug 2019 15:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QfnP4WFLi3j9Pcefb2omV5XrdW/cAbsj/88MkL4fbvI=; b=Gq51WFCgr1zdsFkg5BQRpfVFNcqwrXt/ByM2qpZmeimqpO9xdv5amX6U9IY+GySEbs MW9UFDu+wuO0qwiLcw5AezTeq7h+VLNv8b5+LbA6ah+w0ZHGGwJQ9WzabRJ356Vtp9rZ xijUotEAFl5yO3Q2wbmCiP2UycrvTZVkEbjiG1pJrgkzA3ISkkoZ73f/08M9ZgLIJ+qX 7YTDOUphK/A4GisdJxfftSNZEA9tT0YrdJ20eY2EViMjxF+/iegHSa0mmgn7SYzSc9Dk wSEfADHPl6hQqvVOX5MkU+S0MdyfKy9IfPUAJcNEePMpK6/NR4D6g9wdaTaNiV0Mm7oq QDNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QfnP4WFLi3j9Pcefb2omV5XrdW/cAbsj/88MkL4fbvI=; b=ePK7TK2A5maoiCKD5bSt54bDh2PG4J+a2Ea38GNsDmlfCuW6cd+oNh2sThZAabY0O/ y8D2pAPoIjlcNsf0IiMLXc8y43E1XRlLPcIWcd93tqATN2VMIx8zLoUjbituBKiHWxw4 f4hrzKPZm/llw/xm74Fd83FVJYEo2H0CzIFzYBc3xcTDJ6p7z5e/ZYIs7pZxPMBiipKF ldDKgabZzyPKeOth1h5RTq2X8XbSHKyZ9vn9xPeoULRnH/ahCIKZVnz/2xuD8uDidjZ9 Qn/l4kE0c7CGgXt6MzIrBFueyTVPcfK/2cSa4umG3f2FQ1nGr5/hQGgIgFn1J76iTWw5 PWJQ== X-Gm-Message-State: APjAAAVi2ITfD/DjjDhzfWcWSWbSHaRXtpayFVDWDebhzYqgSHjAAMDD gCBtEilt4BsebAwIzDYoZv3Uq1fYmw6vCv1lz8ulcA== X-Received: by 2002:aca:1803:: with SMTP id h3mr2930076oih.24.1565129078021; Tue, 06 Aug 2019 15:04:38 -0700 (PDT) MIME-Version: 1.0 References: <20190806192654.138605-1-saravanak@google.com> <20190806192654.138605-2-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Tue, 6 Aug 2019 15:04:01 -0700 Message-ID: Subject: Re: [PATCH 2/2] of/platform: Disable generic device linking code for PowerPC To: Rob Herring Cc: Greg Kroah-Hartman , Frank Rowand , Stephen Rothwell , Android Kernel Team , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@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, Aug 6, 2019 at 2:27 PM Rob Herring wrote: > > On Tue, Aug 6, 2019 at 1:27 PM Saravana Kannan wrote: > > > > PowerPC platforms don't use the generic of/platform code to populate the > > devices from DT. > > Yes, they do. No they don't. My wording could be better, but they don't use of_platform_default_populate_init() https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/platform.c#n511 > > > Therefore the generic device linking code is never used > > in PowerPC. Compile it out to avoid warning about unused functions. > > I'd prefer this get disabled on PPC using 'if (IS_ENABLED(CONFIG_PPC)) > return' rather than #ifdefs. I'm just moving the existing ifndef some lines above. I don't want to go change existing #ifndef in this patch. Maybe that should be a separate patch series that goes and fixes all such code in drivers/of/ or driver/ -Saravana > > > > > If a specific PowerPC platform wants to use this code in the future, > > bringing this back for PowerPC would be trivial. We'll just need to export > > of_link_to_suppliers() and then let the machine specific files do the > > linking as they populate the devices from DT. > > > > Signed-off-by: Saravana Kannan > > --- > > drivers/of/platform.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > > index f68de5c4aeff..a2a4e4b79d43 100644 > > --- a/drivers/of/platform.c > > +++ b/drivers/of/platform.c > > @@ -506,6 +506,7 @@ int of_platform_default_populate(struct device_node *root, > > } > > EXPORT_SYMBOL_GPL(of_platform_default_populate); > > > > +#ifndef CONFIG_PPC > > static bool of_link_is_valid(struct device_node *con, struct device_node *sup) > > { > > of_node_get(sup); > > @@ -683,7 +684,6 @@ static int of_link_to_suppliers(struct device *dev) > > return __of_link_to_suppliers(dev, dev->of_node); > > } > > > > -#ifndef CONFIG_PPC > > static const struct of_device_id reserved_mem_matches[] = { > > { .compatible = "qcom,rmtfs-mem" }, > > { .compatible = "qcom,cmd-db" }, > > -- > > 2.22.0.770.g0f2c4a37fd-goog > >