From patchwork Thu Jul 20 15:51:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9855233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 92F3160393 for ; Thu, 20 Jul 2017 15:53:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83D85286B2 for ; Thu, 20 Jul 2017 15:53:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7868F286D6; Thu, 20 Jul 2017 15:53:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01297286BC for ; Thu, 20 Jul 2017 15:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965789AbdGTPxH (ORCPT ); Thu, 20 Jul 2017 11:53:07 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:52644 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965731AbdGTPxG (ORCPT ); Thu, 20 Jul 2017 11:53:06 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0MgTYM-1dDnBs1SWk-00NhKn; Thu, 20 Jul 2017 17:52:58 +0200 From: Arnd Bergmann To: Tony Lindgren Cc: Arnd Bergmann , Lokesh Vutla , Keerthy , Grygorii Strashko , Laurent Pinchart , Sebastian Reichel , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/12] ARM: omap2: mark unused functions as __maybe_unused Date: Thu, 20 Jul 2017 17:51:44 +0200 Message-Id: <20170720155209.3250880-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170720154616.3250481-1-arnd@arndb.de> References: <20170720154616.3250481-1-arnd@arndb.de> X-Provags-ID: V03:K0:Mlo5ZjoP5w7YAEzAIcj1EasSNEBBlGKMohHsZnRrjBFKx1y9HJS EVacMMEIGCV49x6M8umXcgr+jN3ToMUp7EUbjyL0bx0Xh0yh2poVVlsBd3G7s/zShROGRDF 3FkC9g5Wqmx5ezmTnvQYY/B/nPMY569xwpWyw9buTeuJ5vFs17PoNoDI40qZimYzx4dhPAe 5/6VCAJxtYHfMod/fnsqA== X-UI-Out-Filterresults: notjunk:1; V01:K0:sbuHBaUulXw=:vSWkXHXFFwYOmevPLDTMAg wgzkw23aHUN9cSUFpCXtMNSof/tQRZCLZwfxfJzexf6vYcsv0IVek8a28YsVeZEk3ThuAb4lD XoieE1IEk8Aw5EB16gY0uzev6oGoLAVfF7gUy3aJyC4ZB1ES4umyWEZhSf+mNVkK21rHXv03q W5S9Tn8irKii5VN5DW1AsFieADjRGuwnRXk078wkwRkSeiZeuqNXc3Awur+WLRJTDHV63B5CE gk1UaJMrBlyPJIJrgOYr/dHZutLg56C3/vqeWikqWYeaZdk77zdMW2Taxzb1QgW7omnRYI+yo M952Hq6jUsj0RzUiepSnxgwTG8T22IlbspiVGR8MCAKfMryHyRLQ3AVRJCEzcVYl0PWQn8LVB kKBv1BmYgF4y5+SGny0QBSbmRLfH4pLvrZAgUKFVLGxKHNKonml99I44n0R/Nw/mp+LK5jbDJ kbNPdS0uyQ3OkaulmRtYKKPdxYt3wce5rDqiZlhuUW9A5FcQVFsPvdacBEmJ9tHdz9tmanvww JZNo4tzEnkO2i9AjtK/mvDQWTm7rzYp6AQ4TKjkv1/RtItLSVUkEXwe56DGllcfaWA12WewEh PfphMPLyZAZslGr8ETytvUQVbPrfHR0fjRhAjcULqKwge3nk5KyOro6TSY5iThA0Wd01AcQRV i/rGOftoMd3ijHEal0nuxHq1UmN09B0o5BpX568Iua4AoqTB5nR7qSz0PtdmB1HTkemRvg/eg ICBvjHQjYCJf4pf+ZkTnjfXSOIyf/LeqYtGlow== Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The omap_generic_init() and omap_hwmod_init_postsetup() functions are used in the initialization for all OMAP2+ SoC types, but in the extreme case that those are all disabled, we get a warning about unused code: arch/arm/mach-omap2/io.c:412:123: error: 'omap_hwmod_init_postsetup' defined but not used [-Werror=unused-function] arch/arm/mach-omap2/board-generic.c:30:123: error: 'omap_generic_init' defined but not used [-Werror=unused-function] This annotates both as __maybe_unused to shut up that warning. Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Reviewed-by: Sebastian Reichel --- Originally sent in Feb 2016, but it got lost for some reason. --- arch/arm/mach-omap2/board-generic.c | 2 +- arch/arm/mach-omap2/io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index dc9e34e670a2..b1e661bb5521 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -28,7 +28,7 @@ static const struct of_device_id omap_dt_match_table[] __initconst = { { } }; -static void __init omap_generic_init(void) +static void __init __maybe_unused omap_generic_init(void) { pdata_quirks_init(omap_dt_match_table); diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 1d739d1a0a65..1cd20e4d56b0 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -410,7 +410,7 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); } -static void __init omap_hwmod_init_postsetup(void) +static void __init __maybe_unused omap_hwmod_init_postsetup(void) { u8 postsetup_state;