From patchwork Tue Jan 6 17:54:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 42797 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ECCCE2055F for ; Tue, 6 Jan 2015 17:54:34 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf13326340wgg.8 for ; Tue, 06 Jan 2015 09:54:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=3urT5JUxpb+AcBqpVWMqRfeyfjlI71mJKN9oweI15Bc=; b=PaayOjwjhmwRpWv3Vf/UWLUwb9tjTdHO2s5YWp7D4yAvDka6Uu2znbXA6Qx8m8B9iB QCnOr5s/mt5JJcvEEEtUnTACf+kE8JbG8eyKpW/S8ptxKouVsMRMqU4EfXhJogNeojSt yqsh30pgAM5Gkw89TFEqcmmamNUYWtSfXk2yhtVnzbpCaTkLTIdt5kUby2i/pSJHD64G 7TeClYvEntGDOayjf0Q/CCTi90bhDjLFg7BPEStW2B6zavJjzGJ6OOcAtMA/uSbF+TY9 +0ZIrI/wBi2coJNuG+ZDDMX8gJMJljbxypOPjDtrxQbyGoolXed5JB84ZvS+fwrJrjMW bQLA== X-Gm-Message-State: ALoCoQmWhfy2j6K69/QiaBt1ksoPNRjn7PATKGMY2oUQJmOqb4JsQ0MtdOLrx7Lgi57wcvLUX6Wz X-Received: by 10.112.42.104 with SMTP id n8mr47840lbl.19.1420566874284; Tue, 06 Jan 2015 09:54:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.203 with SMTP id ug11ls56509lac.67.gmail; Tue, 06 Jan 2015 09:54:34 -0800 (PST) X-Received: by 10.152.23.164 with SMTP id n4mr99490959laf.77.1420566874100; Tue, 06 Jan 2015 09:54:34 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id r2si6416087lbw.35.2015.01.06.09.54.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 09:54:33 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id l4so19489036lbv.25 for ; Tue, 06 Jan 2015 09:54:33 -0800 (PST) X-Received: by 10.112.89.232 with SMTP id br8mr62705312lbb.69.1420566873672; Tue, 06 Jan 2015 09:54:33 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1244152lbb; Tue, 6 Jan 2015 09:54:32 -0800 (PST) X-Received: by 10.67.10.227 with SMTP id ed3mr100890124pad.116.1420566871995; Tue, 06 Jan 2015 09:54:31 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ke10si89402546pbc.235.2015.01.06.09.54.31; Tue, 06 Jan 2015 09:54:31 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756181AbbAFRy3 (ORCPT + 27 others); Tue, 6 Jan 2015 12:54:29 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:54947 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752115AbbAFRy1 (ORCPT ); Tue, 6 Jan 2015 12:54:27 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so31311894pad.23 for ; Tue, 06 Jan 2015 09:54:26 -0800 (PST) X-Received: by 10.70.89.174 with SMTP id bp14mr156049289pdb.136.1420566866681; Tue, 06 Jan 2015 09:54:26 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [70.73.24.112]) by mx.google.com with ESMTPSA id ka5sm41094963pbc.27.2015.01.06.09.54.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Jan 2015 09:54:25 -0800 (PST) From: mathieu.poirier@linaro.org To: geert@linux-m68k.org Cc: linux-kernel@vger.kernel.org, pratikp@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mathieu.poirier@linaro.org Subject: [PATCH] coresight: Fixing wrong #ifdef/#endif placement Date: Tue, 6 Jan 2015 10:54:12 -0700 Message-Id: <1420566852-20816-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mathieu Poirier Fixing problem reported by: https://lkml.org/lkml/2015/1/6/86 The #ifdef/#endif is wrong and prevents the stub of function of_get_coresight_platform_data() from being visible when CONFIG_OF is not defined. Moving CONFIG_OF condition out of CONFIG_CORESIGHT, making them both independent. Signed-off-by: Mathieu Poirier --- include/linux/coresight.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 5d3c54311f7a..4404033ee879 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -239,10 +239,6 @@ extern void coresight_disable(struct coresight_device *csdev); extern int coresight_is_bit_set(u32 val, int position, int value); extern int coresight_timeout(void __iomem *addr, u32 offset, int position, int value); -#ifdef CONFIG_OF -extern struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node); -#endif #else static inline struct coresight_device * coresight_register(struct coresight_desc *desc) { return NULL; } @@ -254,10 +250,14 @@ static inline int coresight_is_bit_set(u32 val, int position, int value) { return 0; } static inline int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) { return 1; } +#endif + #ifdef CONFIG_OF +extern struct coresight_platform_data *of_get_coresight_platform_data( + struct device *dev, struct device_node *node); +#else static inline struct coresight_platform_data *of_get_coresight_platform_data( struct device *dev, struct device_node *node) { return NULL; } #endif -#endif #endif