From patchwork Tue Aug 27 12:31:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: manjunath.goudar@linaro.org X-Patchwork-Id: 19546 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CA2CE2469A for ; Tue, 27 Aug 2013 12:32:00 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id f14sf3780641qak.2 for ; Tue, 27 Aug 2013 05:32:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=+UnDjzNluOtydZ6IP0aEIPQwpKKKJMeuEryclzoG4MU=; b=DKmxbrME7OhIKd0VBpQRLA4mN+tIH/ykKPRSBlW5uIPR1pxdV8+a14xtM9dcBRb+NI x0dxQEhJ9AA6Kenp59lM2YExVrQtq5dBqPmCvfwYc7s/JrlYUS7I9FtrG0wov2EnYDDJ 1isKLcZBmCxlhretTqQYZTucGZfZ6kwXwV3zX2qbu7mxitdRAUoJAdYCte4/cLl6pD5R rDn1j4GhpHByjp/yNTuoHhDAPuYXSE/W4m0m9dvtQhGbc0gYKIJ8xamwpTuDaxj099Mn Ml6KMs9RE3qKO6e4FaKJwP4fS5dx35K44IOFHfSd0az3bCFyhsSoQ5scAOwXyuQkrnY3 gk4A== X-Received: by 10.236.19.225 with SMTP id n61mr7458562yhn.8.1377606720469; Tue, 27 Aug 2013 05:32:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.198 with SMTP id gg6ls2759872qeb.89.gmail; Tue, 27 Aug 2013 05:32:00 -0700 (PDT) X-Received: by 10.221.56.194 with SMTP id wd2mr20496416vcb.7.1377606720378; Tue, 27 Aug 2013 05:32:00 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id gq10si4821402vdc.43.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 05:32:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so3099293vbb.9 for ; Tue, 27 Aug 2013 05:32:00 -0700 (PDT) X-Gm-Message-State: ALoCoQnx5T9Lw1/uv+o60RFC37JQRYlLkk3E8nd6DugOZXcTvHDXGigP7V/juFQGNWCnFGO9mPeb X-Received: by 10.58.198.13 with SMTP id iy13mr20147287vec.11.1377606720070; Tue, 27 Aug 2013 05:32:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp291792vcz; Tue, 27 Aug 2013 05:31:59 -0700 (PDT) X-Received: by 10.66.219.200 with SMTP id pq8mr20260720pac.123.1377606718406; Tue, 27 Aug 2013 05:31:58 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id bo2si15686031pbb.74.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 05:31:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of manjunath.goudar@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id y10so4805714pdj.11 for ; Tue, 27 Aug 2013 05:31:57 -0700 (PDT) X-Received: by 10.67.1.228 with SMTP id bj4mr8608585pad.157.1377606717666; Tue, 27 Aug 2013 05:31:57 -0700 (PDT) Received: from manjunath-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id ha10sm1130271pbc.23.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 05:31:56 -0700 (PDT) From: Manjunath Goudar To: manjunath.goudar@linaro.org Cc: arnd@linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, dsaxena@linaro.org Subject: [PATCH V2] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors. Date: Tue, 27 Aug 2013 18:01:44 +0530 Message-Id: <1377606704-27460-1-git-send-email-manjunath.goudar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1375592514-14213-1-git-send-email-manjunath.goudar@linaro.org> References: <1375592514-14213-1-git-send-email-manjunath.goudar@linaro.org> MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: manjunath.goudar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: Arnd Bergmann Cc: Pawel Moll Cc: Deepak Saxena Cc: Samuel Ortiz Cc: Lee Jones V2: -Made of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" instead of Kconfig dependence setting in V1 patch and else part return inline dummy implementations (returning NULL) to fix the above randconfig error. --- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 90a8811..4be252a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -196,10 +196,22 @@ static inline struct device_node *of_find_matching_node( #define for_each_matching_node_and_match(dn, matches, match) \ for (dn = of_find_matching_node_and_match(NULL, matches, match); \ dn; dn = of_find_matching_node_and_match(dn, matches, match)) -extern struct device_node *of_find_node_by_path(const char *path); + +#ifdef CONFIG_OF extern struct device_node *of_find_node_by_phandle(phandle handle); -extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_parent(struct device_node *node); +#else +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; +} +#endif +extern struct device_node *of_find_node_by_path(const char *path); +extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev); extern struct device_node *of_get_next_available_child(