From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbbLIQgk (ORCPT ); Wed, 9 Dec 2015 11:36:40 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:52434 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbbLIQgi (ORCPT ); Wed, 9 Dec 2015 11:36:38 -0500 From: Arnd Bergmann To: robert.jarzmik@free.fr Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Mack , Haojian Zhuang Subject: [PATCH] ARM: pxa: mark ezx structures as __maybe_unused Date: Wed, 09 Dec 2015 17:36:03 +0100 Message-ID: <7455848.ygDvrz6r6S@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:ct/yXNVmqFYvGN7qAF7iIIEsKwxQ7Vaz4qyXP/lj5woLorTCWqK UYnNIILDlJheK5f8Qt7NTbNHEFqIIlZvuzvy99bMlu/e73LQuCLvBoe7M0YEu8QmO+YstY7 3RvsiWUnat2j0EjmwL7kjeFNqCAQTLA2Bpr7ZAGCCIkfSUFnrxPIH/16DEUQW65lrLnGq/Y 2rq12c26twd5k0+X9StTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:WC4c09FUQ+w=:0apV9qQX2nEzuOT3pJySVl 7VJ+EdcOzfB4Ywcdn0ILeHc+iZKAfrF/5aKr6V5Gn+lkM4Lap12X8JOUxt/W8yfuZzofLNyBL knMFVQ1fhPPxKmX2J6g16OeEkY3eMYmvYjW+LL5cvLAfSXFSishmvcvljXUuOcI9pWinAjhvW nsCYl4CNa4bGDHR4ufPw1fANDx9+gD1g++HK6lGvtXso+avc+XOZlUOEsg+atNzOCJC/Iqz1b huwESabiKzTSP/hVQC6u4daSQU+NFUYwQgxf7kKT4ZKSwV+WfUgmyXu6ck5YIjVaAkyQB7gfS OEqsPBdxvKNZsi+MwRpWd429jKYx3JGXt/GSOUxn28gh1UZeK4AFra850ZEUKtU7dNHejGmxy S7BVUkowUP+WL/0XnXC3hDCVL/f+Wu3XIfecWWyJtrxNVgq7Jy/EMQUjAUP7pxCbLExh44Z/9 PbU9n4Jr2G98QlZP7KHmc+SMqwohUKEUuZvWheuKnMLVceSzI9gYpg9IY/BGBFEOtB6GcKxfT VpjJC3xGSFh08yCvcH3dbwSacEpiwvrfOd8kUQ5nY2finp89RLbEPSE5dUVCxb3uVO6cHfQKS 9Ttolln6MraSXE2uSj3AuYFXNRICxH6pQ2B/qLG9iRpL95O+hOa1PqKcd99CPRaiReDkTOWtF r4Gq5cE66SbG36Z5UNS1RwIXJYPF3cld8jvc20/srhcc7pPUkm6+F09kGt2IPV4myNuxdJdJq jdAuI6xerYuaumsL Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ezx platform contains multiple machine descriptors, but not all of them use all of the data structures, and it's possible to disable all of the machines, which produces some harmless warnings: mach-pxa/ezx.c:53:26: warning: 'ezx_pwm_lookup' defined but not used [-Wunused-variable] mach-pxa/ezx.c:86:31: warning: 'ezx_fb_info_1' defined but not used [-Wunused-variable] mach-pxa/ezx.c:107:31: warning: 'ezx_fb_info_2' defined but not used [-Wunused-variable] mach-pxa/ezx.c:113:32: warning: 'ezx_devices' defined but not used [-Wunused-variable] mach-pxa/ezx.c:117:22: warning: 'ezx_pin_config' defined but not used [-Wunused-variable] This marks all those structures as __maybe_unused to avoid the warnings. Obviously a configuration that contains the ezx platform but no specific model is a bit silly, but it should not cause compile-time warnings. Signed-off-by: Arnd Bergmann diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index b61b7971b54f..391ba898b971 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c @@ -50,7 +50,7 @@ #define GPIO19_GEN1_CAM_RST 19 #define GPIO28_GEN2_CAM_RST 28 -static struct pwm_lookup ezx_pwm_lookup[] = { +static struct pwm_lookup ezx_pwm_lookup[] __maybe_unused = { PWM_LOOKUP("pxa27x-pwm.0", 0, "pwm-backlight.0", NULL, 78700, PWM_POLARITY_NORMAL), }; @@ -83,7 +83,7 @@ static struct pxafb_mode_info mode_ezx_old = { .sync = 0, }; -static struct pxafb_mach_info ezx_fb_info_1 = { +static struct pxafb_mach_info ezx_fb_info_1 __maybe_unused = { .modes = &mode_ezx_old, .num_modes = 1, .lcd_conn = LCD_COLOR_TFT_16BPP, @@ -104,17 +104,17 @@ static struct pxafb_mode_info mode_72r89803y01 = { .sync = 0, }; -static struct pxafb_mach_info ezx_fb_info_2 = { +static struct pxafb_mach_info ezx_fb_info_2 __maybe_unused = { .modes = &mode_72r89803y01, .num_modes = 1, .lcd_conn = LCD_COLOR_TFT_18BPP, }; -static struct platform_device *ezx_devices[] __initdata = { +static struct platform_device *ezx_devices[] __initdata __maybe_unused = { &ezx_backlight_device, }; -static unsigned long ezx_pin_config[] __initdata = { +static unsigned long ezx_pin_config[] __initdata __maybe_unused = { /* PWM backlight */ GPIO16_PWM0_OUT,