From patchwork Fri Aug 25 16:56:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 805977 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="t7bLW/ie"; 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 3xf6lb6SbNz9s7M for ; Sat, 26 Aug 2017 02:57:15 +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=Yd2uhV3n3h2ZoU3Y/k8kwZ+HoMF44jbTVm40aMQR60A=; b=t7b LW/ienIBhKKJdP3w/FIO6uzSbLezIQROTVpZfeH/JGqVqEBDAejnZtV78yWVA60cOjE2PXsBQZuvR RzL9lFnIAN/mN3GiQx7M0jOJVsv+nJ7g7A5JVWQ9mnLjpKdOYMxa1jLfKN65+TGGBzcJCNpHihckk DFNz6yVpXrSjfQGyZ/mmO2r24MKbH25lJ7BV4kzXnCF6/7tRgyRi90cXgTjaot28ExefqcuzGmByi VePT3oYjecPJhRoGhAq+5Uw2XH2wWOKG4R9XkMnGn3+yw1MERuMex3fVH1bHP7XUX7wajyoEKhYIE 0lAOLnJAb0qpJlDaZmcfJFsbsP3xj2g==; 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 1dlHv0-0008Vo-FY; Fri, 25 Aug 2017 16:57:14 +0000 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dlHuw-0008MK-HJ for linux-snps-arc@lists.infradead.org; Fri, 25 Aug 2017 16:57:12 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 5F78424E1F11; Fri, 25 Aug 2017 09:56:49 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 4601CA16; Fri, 25 Aug 2017 09:56:49 -0700 (PDT) Received: from localhost.internal.synopsys.com (unknown [10.121.8.106]) by mailhost.synopsys.com (Postfix) with ESMTP id 71F789DC; Fri, 25 Aug 2017 09:56:47 -0700 (PDT) From: Eugeniy Paltsev To: devicetree@vger.kernel.org Subject: [PATCH v2] OF: move extern declarations of of_stdout inside ifdef Date: Fri, 25 Aug 2017 19:56:44 +0300 Message-Id: <20170825165644.30800-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_095710_666121_677A62D6 X-CRM114-Status: UNSURE ( 6.57 ) 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_stdout" pointer inside "CONFIG_OF" ifdef to be able to get rid of "CONFIG_OF" ifdef in its usage places. Suggested-by: Steven Rostedt Signed-off-by: Eugeniy Paltsev Acked-by: Rob Herring --- For example see: https://lkml.org/lkml/2017/8/25/337 Changes v1->v2: * Move only "of_stdout" declarations instead of all entry pointers declarations include/linux/of.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/of.h b/include/linux/of.h index cfc3411..be28cb9 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -135,7 +135,6 @@ static inline void of_node_put(struct device_node *node) { } 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 +146,8 @@ extern raw_spinlock_t devtree_lock; #define OF_BAD_ADDR ((u64)-1) #ifdef CONFIG_OF +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,7 @@ 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_stdout NULL static inline void of_core_init(void) {