Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933840AbdHYPoE (ORCPT ); Fri, 25 Aug 2017 11:44:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:37094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933598AbdHYPoC (ORCPT ); Fri, 25 Aug 2017 11:44:02 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0D5421A6A 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@kernel.org MIME-Version: 1.0 In-Reply-To: <20170825150027.25341-1-Eugeniy.Paltsev@synopsys.com> References: <20170825150027.25341-1-Eugeniy.Paltsev@synopsys.com> From: Rob Herring Date: Fri, 25 Aug 2017 10:43:40 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef To: Eugeniy Paltsev Cc: "devicetree@vger.kernel.org" , linux-snps-arc@lists.infradead.org, Linux Kernel Mailing List , Rob Herring , Frank Rowand , Steven Rostedt Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1198 Lines: 33 On Fri, Aug 25, 2017 at 10:00 AM, Eugeniy Paltsev wrote: > Move extern declarations of "of_root", "of_chosen", "of_aliases", > "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid > of "CONFIG_OF" ifdef in their usage places. > > Suggested-by: Steven Rostedt > > Signed-off-by: Eugeniy Paltsev > --- > For example see: https://lkml.org/lkml/2017/8/25/337 > > include/linux/of.h | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/include/linux/of.h b/include/linux/of.h > index cfc3411..d117bf1 100644 > --- a/include/linux/of.h > +++ b/include/linux/of.h > @@ -131,11 +131,6 @@ static inline struct device_node *of_node_get(struct device_node *node) > static inline void of_node_put(struct device_node *node) { } > #endif /* !CONFIG_OF_DYNAMIC */ > > -/* Pointer for first entry in chain of all nodes. */ > -extern struct device_node *of_root; > -extern struct device_node *of_chosen; > -extern struct device_node *of_aliases; > -extern struct device_node *of_stdout; Just move what you need. Some of these I'd like to see be internal to the DT code. Rob