From patchwork Wed Feb 3 21:59:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102853 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp108049lbl; Wed, 3 Feb 2016 14:00:45 -0800 (PST) X-Received: by 10.98.80.91 with SMTP id e88mr6009725pfb.62.1454536845594; Wed, 03 Feb 2016 14:00:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tl10si11624424pac.177.2016.02.03.14.00.45; Wed, 03 Feb 2016 14:00:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965231AbcBCWAo (ORCPT + 6 others); Wed, 3 Feb 2016 17:00:44 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:56397 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964815AbcBCWAn (ORCPT ); Wed, 3 Feb 2016 17:00:43 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0M2MnE-1aAf553Hhk-00s7BL; Wed, 03 Feb 2016 23:00:11 +0100 From: Arnd Bergmann To: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Grant Likely , Frank Rowand , Rob Herring , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] of: always define of_node_cmp() and other functions Date: Wed, 3 Feb 2016 22:59:51 +0100 Message-Id: <1454536806-3755190-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:tiG2Hl+GbS8yC+rUrzyzILELKK+AiEZFDKVe1davhvwAtHHhYNm RmWM7cAJkYJ5l98JhtZugWhxpbgMVrWRw81OfrjV4cjuDrblAkawOSROG92OX/9o8YIHKZP YkzkhVqtFWwdh8QXnrJDjEx+GGuAClOQ8OHg25yxCLDZZAYe+k+8rnNLsbjPj1vXP1r+7JT F89oyV9I6WPBqnufWDa8Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:burN1o/7yBI=:ksGnheXbiXXQzm//tFHNat oZOmISC+F/ftKimDqTEzWo/8neBt4E6b7L89+fuLoWDbHJc3XG/aKyEx6KZFB0ZLN3/fUIZOH xzERtz8/EhmJGqswbHK8eBYPl2IDDjEJ4vyev6zhkIjSplQlHR9SNaiLEnTg7Dfsc/eAcvgx5 dvjtJo9bdoDUqjfF3NTppzTU1WsLy5/NulYWjRtT6/mcxJEfpjCEhmbO3ZGCJABu86SbUbiGl OTV0i/kddSrBKyRwO8Q2ttFnQ1dVFBKFJ1Y1pjjJ6ZwImCw1G06Gdw88dFHkP4/u1xzhFAG1t m+JV8bNG+j4iyYvX9R2HGID98dA7LFXz6P+6cnQE77a54MuXmykCUv+jQx3jHz7IQHHPiqg7O VDv4OpvOU0s26Al2v3doPiiHqVfpkTg5pDsvdwpxRtlCToaPdWE20/S+jyV7oZaHNRnH6F3u6 Jtfqbr+QE7q2JaBAl6z9DrcvcpuXfjM3dlKvZtqhA8b91MP1TMyvgNht01HOmYUofciaSeQPi 2m+X+TiYEyiYjiBQAEwpGeSO02rkZcgPDuMQl8UEEfRXsqOdKGUuv7xvJQfcJHsY0XdeN2kJz eClEFw7sNYTAF8XlE8xz63x4YzLkRT6UX/snGwrh0b4/OIO8Whsb1+GqwqCAHwcWKI2GmxpKV VWqar0w3TvNokKGZoTAPd2cTBLj3vZt8Y67jLouzLYvjPk9kCtVSOtVy3ywygeSvyo84= Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The ti-vpe driver started using of_node_cmp(), and it can be used when CONFIG_OF is disabled, which results in a build failure: drivers/media/platform/ti-vpe/cal.c: In function 'of_get_next_port': drivers/media/platform/ti-vpe/cal.c:1655:12: error: implicit declaration of function 'of_node_cmp' [-Werror=implicit-function-declaration] There is no reason for this, we can simply move the definition outside of the #ifdef CONFIG_OF section without any downsides. Signed-off-by: Arnd Bergmann --- include/linux/of.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/of.h b/include/linux/of.h index dc6e39696b64..f8d9b558f9bd 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -128,6 +128,23 @@ extern raw_spinlock_t devtree_lock; #define OF_BAD_ADDR ((u64)-1) +#if defined(CONFIG_SPARC) +#include +#endif + +/* Default #address and #size cells. Allow arch asm/prom.h to override */ +#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT) +#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 +#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 +#endif + +/* Default string compare functions, Allow arch asm/prom.h to override */ +#if !defined(of_compat_cmp) +#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) +#define of_prop_cmp(s1, s2) strcmp((s1), (s2)) +#define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) +#endif + #ifdef CONFIG_OF void of_core_init(void); @@ -211,23 +228,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) return of_read_number(cell, size); } -#if defined(CONFIG_SPARC) -#include -#endif - -/* Default #address and #size cells. Allow arch asm/prom.h to override */ -#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT) -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 -#endif - -/* Default string compare functions, Allow arch asm/prom.h to override */ -#if !defined(of_compat_cmp) -#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) -#define of_prop_cmp(s1, s2) strcmp((s1), (s2)) -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) -#endif - #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)