From patchwork Fri Aug 25 15:00:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 805942 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MqHptliy"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xf4BG40Wcz9sPs for ; Sat, 26 Aug 2017 01:01:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=j3kBdquEMONwS/JUpocFAUmy6r3ZJfcpYkznUnpNwGM=; b=MqH ptliyOEg07QdHUlikxAQvcoymAs9dFE1cXQ+rlyRCPxbYpDn0fgQA0F7Y5TSnE7hkuoGwNVAMdHB6 oyLjOWvhdqOy5pwKG+jEeZnGyzB7TfHVYdO35bdgffV//tAB+I8EaHR7IwUhQbAlsi190iGiIVahz yt8Mg8dE0DV0dytHzIgQdKcJSJMoiOVkRa4rg8Smo4Ae+Y3f/mgqGcL4Sn1MZFg/tgWw4defhhjOM moUxGVRaQa7JIlu2aJv4sff/s8WefVM1rKOlpU9gtuJ/5pIHkid+c/9QIh9BJ4esDhWBg3D3kjhBi m0m6NaLtLV5aMYMuFDekdnTB44qPtAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dlG7B-0005nd-62; Fri, 25 Aug 2017 15:01:41 +0000 Received: from smtprelay4.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dlG72-0005VW-NO for linux-snps-arc@lists.infradead.org; Fri, 25 Aug 2017 15:01:38 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 6229224E1407; Fri, 25 Aug 2017 08:01:10 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 44EC262D; Fri, 25 Aug 2017 08:01:10 -0700 (PDT) Received: from localhost.internal.synopsys.com (unknown [10.121.8.106]) by mailhost.synopsys.com (Postfix) with ESMTP id 578C55EF; Fri, 25 Aug 2017 08:01:08 -0700 (PDT) From: Eugeniy Paltsev To: devicetree@vger.kernel.org Subject: [PATCH] OF: move extern declarations of entry pointers inside ifdef Date: Fri, 25 Aug 2017 18:00:26 +0300 Message-Id: <20170825150027.25341-1-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170825_080132_992648_8D781CB2 X-CRM114-Status: UNSURE ( 6.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [198.182.47.9 listed in wl.mailspike.net] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eugeniy Paltsev , linux-kernel@vger.kernel.org, Steven Rostedt , Rob Herring , linux-snps-arc@lists.infradead.org, Frank Rowand MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 Acked-by: Steven Rostedt (VMware) --- 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; extern raw_spinlock_t devtree_lock; /* flag descriptions (need to be visible even when !CONFIG_OF) */ @@ -147,6 +142,12 @@ extern raw_spinlock_t devtree_lock; #define OF_BAD_ADDR ((u64)-1) #ifdef CONFIG_OF +/* 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; + void of_core_init(void); static inline bool is_of_node(const struct fwnode_handle *fwnode) @@ -539,6 +540,10 @@ const char *of_prop_next_string(struct property *prop, const char *cur); bool of_console_check(struct device_node *dn, char *name, int index); #else /* CONFIG_OF */ +#define of_root NULL +#define of_chosen NULL +#define of_aliases NULL +#define of_stdout NULL static inline void of_core_init(void) {