Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752655AbbLIRNR (ORCPT ); Wed, 9 Dec 2015 12:13:17 -0500 Received: from svenfoo.org ([82.94.215.22]:44659 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbbLIRNQ (ORCPT ); Wed, 9 Dec 2015 12:13:16 -0500 X-Greylist: delayed 449 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Dec 2015 12:13:16 EST Subject: Re: [PATCH] ARM: pxa: mark raumfeld init functions as __maybe_unused To: Arnd Bergmann , robert.jarzmik@free.fr References: <2245032.bpQt17WIoe@wuerfel> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Haojian Zhuang From: Daniel Mack Message-ID: <56685F60.6030200@zonque.org> Date: Wed, 9 Dec 2015 18:05:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <2245032.bpQt17WIoe@wuerfel> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2079 Lines: 56 On 12/09/2015 05:52 PM, Arnd Bergmann wrote: > The raumfeld.c file contains three similar machine definitions, > each with their own init function. If one or more of them are > disabled, we get compile-time warnings: > > arm/mach-pxa/raumfeld.c:1070:123: warning: 'raumfeld_connector_init' defined but not used [-Wunused-function] > arm/mach-pxa/raumfeld.c:1082:123: warning: 'raumfeld_speaker_init' defined but not used [-Wunused-function] > > This marks the functions as __maybe_unused to avoid the warnings. > > Signed-off-by: Arnd Bergmann Acked-by: Daniel Mack Thanks! > > diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c > index 0f67d94be297..8347d87a713d 100644 > --- a/arch/arm/mach-pxa/raumfeld.c > +++ b/arch/arm/mach-pxa/raumfeld.c > @@ -1046,7 +1046,7 @@ static void __init raumfeld_common_init(void) > i2c_register_board_info(1, &raumfeld_pwri2c_board_info, 1); > } > > -static void __init raumfeld_controller_init(void) > +static void __init __maybe_unused raumfeld_controller_init(void) > { > int ret; > > @@ -1067,7 +1067,7 @@ static void __init raumfeld_controller_init(void) > raumfeld_w1_init(); > } > > -static void __init raumfeld_connector_init(void) > +static void __init __maybe_unused raumfeld_connector_init(void) > { > pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_connector_pin_config)); > spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices)); > @@ -1079,7 +1079,7 @@ static void __init raumfeld_connector_init(void) > raumfeld_common_init(); > } > > -static void __init raumfeld_speaker_init(void) > +static void __init __maybe_unused raumfeld_speaker_init(void) > { > pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_speaker_pin_config)); > spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices)); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/