From patchwork Tue Oct 8 10:41:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Majunath Goudar X-Patchwork-Id: 3002761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C91CCBF924 for ; Tue, 8 Oct 2013 10:42:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D30DC20176 for ; Tue, 8 Oct 2013 10:42:20 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 92999200DC for ; Tue, 8 Oct 2013 10:42:19 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTUk3-0008UJ-TN; Tue, 08 Oct 2013 10:42:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTUk0-0002fV-W2; Tue, 08 Oct 2013 10:42:13 +0000 Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTUjy-0002dT-V9 for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2013 10:42:11 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so8401021pbb.5 for ; Tue, 08 Oct 2013 03:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=14hnxC88vQaRh5inRs07oS8eJWxiwGQOZ04rcE9hmrE=; b=nwFb9vHprwKPpm+DSd5D+HV7LeEgibhzVaBAoBTj+7XoSLQPcjeYbKaRg4fdzhy4zI NFoRWW+R7NA66OpAG4hzozixt0rFuLIyFZz+/bzLGY9CSjRxUZSCUuufZrQkxb/6/Dvy eaqIbnAnhO0IJuEpL/eyZBBSpX3OtR7XNX4DU6P9A7BObjFr15qaWiUFS2qA8v8lJCS2 9NNm99QyJEsu1kWoVTL0IyAgCdM/P5jPwGlp3/3LfliI996jr7LOL/6BC0mykXuympri bdQ5Kbn3r/0jrrBX+zyJ8fD+BG4XYkGgNtOMOs05hWKchKZchIzYFoLUYBo0dHZXTzYy Q7Pg== X-Received: by 10.66.157.165 with SMTP id wn5mr2675536pab.169.1381228909552; Tue, 08 Oct 2013 03:41:49 -0700 (PDT) Received: from manjunath-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id 7sm46327450paf.22.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 03:41:48 -0700 (PDT) From: Majunath Goudar To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors. Date: Tue, 8 Oct 2013 16:11:35 +0530 Message-Id: <1381228895-24814-1-git-send-email-csmanjuvijay@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131008_064211_087649_96F191E7 X-CRM114-Status: GOOD ( 11.22 ) X-Spam-Score: 0.1 (/) Cc: devicetree@vger.kernel.org, Samuel Ortiz , Pawel Moll , linux-kernel@vger.kernel.org, Rob Herring , Majunath Goudar , Grant Likely , nataraja.km@lge.com, Lee Jones X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" else part return inline dummy implementations (returning NULL). Without this patch,build system can lead to issues. This was discovered during randconfig testing,in which VEXPRESS_CONFIG was enabled w/o CONFIG_OF being enabled,leading to the following error: CC drivers/mfd/vexpress-config.o drivers/mfd/vexpress-config.c: In function ‘__vexpress_config_func_get’: drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function ‘of_find_node_by_phandle’ [-Werror=implicit-function-declaration] bridge_node = of_find_node_by_phandle( ^ drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from integer without a cast [enabled by default] bridge_node = of_find_node_by_phandle( Signed-off-by: Manjunath Goudar Cc: Grant Likely Cc: Rob Herring Cc: Pawel Moll Cc: Samuel Ortiz Cc: Lee Jones Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- include/linux/of.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/of.h b/include/linux/of.h index f95aee3..968787d 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -340,6 +340,15 @@ int of_device_is_stdout_path(struct device_node *dn); #else /* CONFIG_OF */ +static inline struct device_node *of_find_node_by_phandle(phandle handle) +{ + return NULL; +} +static inline struct device_node *of_get_next_parent(struct device_node *node) +{ + return NULL; +} + static inline const char* of_node_full_name(struct device_node *np) { return "";