From patchwork Mon Feb 18 23:58:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2160651 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 713E5DF25A for ; Mon, 18 Feb 2013 22:58:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757530Ab3BRW6A (ORCPT ); Mon, 18 Feb 2013 17:58:00 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:46224 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757512Ab3BRW6A convert rfc822-to-8bit (ORCPT ); Mon, 18 Feb 2013 17:58:00 -0500 Received: by mail-lb0-f172.google.com with SMTP id n8so4692858lbj.31 for ; Mon, 18 Feb 2013 14:57:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:cc:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=xobvkFub9U0gaiJrc6+hiOCOB3/C7wjfnhngKmpkx8M=; b=ksXZzaKnqVJIg+X1lS0X5k2ABiVYG7gsHEapMEnHhNjKhM5yYgJjjfpaRZ5Rxj5FGZ Is0W/nT1dWdjCS7rGXL2uBt2RjiaqDYGaoxuob2lP1vKQUnBLtxsTqi2S5MS4zll21u8 LMsje1Tk31kdu3sR8hc8dt4N6D0zjsIuR+OAj/e4/45TiaQW298RVe+MLbRxiUpTuKE/ x3jn+v+y5kF1KCm0pXW4ts1yojftNIDiDiqyezLJMWLQKjfEJX1rk6flZ/gP16MAodbn 0WrVfoga3X4w6x7iLOqEj31iLFYEUzfZ9vFOmldeLwJxUWqBLTvjWaE+j69cv6gclyZp TCpg== X-Received: by 10.112.48.163 with SMTP id m3mr6205859lbn.90.1361228278538; Mon, 18 Feb 2013 14:57:58 -0800 (PST) Received: from wasted.dev.rtsoft.ru (ppp91-79-66-25.pppoe.mtu-net.ru. [91.79.66.25]) by mx.google.com with ESMTPS id b3sm21334909lbl.0.2013.02.18.14.57.56 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 18 Feb 2013 14:57:57 -0800 (PST) To: grant.likely@secretlab.ca, rob.herring@calxeda.com, devicetree-discuss@lists.ozlabs.org Subject: [PATCH] : fix compilation warnings with DT disabled Cc: vladimir.barinov@cogentembedded.com, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Tue, 19 Feb 2013 02:58:25 +0300 MIME-Version: 1.0 Message-Id: <201302190258.25726.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQlM/ddA5pxfZko2GBYpDz9mOZWQM3EORJ55YVcVjrCjvCnxRqtYRphlV6x2/vb6soWUCAzY Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Fix the following compilation warnings (in Simon Horman's renesas.git repo): In file included from arch/arm/mach-shmobile/setup-r8a7779.c:24:0: include/linux/of_platform.h:107:13: warning: ‘struct of_device_id’ declared inside parameter list [enabled by default] include/linux/of_platform.h:107:13: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/linux/of_platform.h:107:13: warning: ‘struct device_node’ declared inside parameter list [enabled by default] only #include's headers with definitions of the above mentioned structures if CONFIG_OF_DEVICE=y but uses them even if not. One solution is to move some #include's out of #ifdef CONFIG_OF_DEVICE and use incomplete declarations for the rest of the structures where the #ifdef move doesn't help... Reported-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman --- Actually, it compiles eve without 'struct device_node' declared, I haven't found the reason of this, so left it there... include/linux/of_platform.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/include/linux/of_platform.h =================================================================== --- linux.orig/include/linux/of_platform.h +++ linux/include/linux/of_platform.h @@ -11,9 +11,10 @@ * */ -#ifdef CONFIG_OF_DEVICE #include #include + +#ifdef CONFIG_OF_DEVICE #include #include #include @@ -100,7 +101,7 @@ extern int of_platform_populate(struct d #if !defined(CONFIG_OF_ADDRESS) struct of_dev_auxdata; -struct device; +struct device_node; static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup,