From patchwork Tue Feb 23 13:57:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8391921 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0F74C9F1D4 for ; Tue, 23 Feb 2016 13:59:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42FC02026C for ; Tue, 23 Feb 2016 13:59:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E02320122 for ; Tue, 23 Feb 2016 13:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752631AbcBWN62 (ORCPT ); Tue, 23 Feb 2016 08:58:28 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:64669 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752378AbcBWN60 (ORCPT ); Tue, 23 Feb 2016 08:58:26 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0MbxjC-1aFzpr2gZq-00JL6r; Tue, 23 Feb 2016 14:58:05 +0100 From: Arnd Bergmann To: Tony Lindgren Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ARM: omap2: mark unused functions as __maybe_unused Date: Tue, 23 Feb 2016 14:57:51 +0100 Message-Id: <1456235876-4088840-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456235876-4088840-1-git-send-email-arnd@arndb.de> References: <1456235876-4088840-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:cAicmy4lcbZjANGavrBov907mkNm2ocDBM+LaDBAnqpbPuASJfu HZzvm+53AQ1ifnlUsdNMQSw+86jns52uylRR1ZOUUFA9sPRt8YLGvtrtp5MHMjr6tWs80ze p0Cx5DDsdYzq4gtFRM5zFfqJTMBzMv7SlZ2p9g0Kpl9MRIDVtdifj9/m1xmqD/AziaydC/a lXMgsYTKYmlRz2Ssf8tUw== X-UI-Out-Filterresults: notjunk:1; V01:K0:8V0WgFWcBBc=:w/WS82CFk1yDmDHFoIdgAs 3XKb8BDEe0DQbl3Eq9m4XmcI0Yz1xFsFTWupKUVt5xz3NY6yLim8PngVXmP+OuU2g3eaS7Hky uzCutl57XMFLq4QivZmqPSZCBvB4/4vLj2pw23BOvcKUQQW7dClYAq2T0B+0M3Q4AgTLp+oki FFHHWgu2MHVCxKg+Fb6HeIHEpV9Y0FdN9y8W7ZzjngclrIQVuVAqZOJycq7rrUZwpZyHIRjQN iqTZuViThB4pKhSuRanDRWev0EAxLUjydPTyD2aYtFHv+UoM8R53N2H0nE5xeT8UIKbk82Tud zqAcKhOqMQYOl8HkEW+cAegw6piQ3l7cqFMoIn+imNrWUEFZCUrP98Uw0SO2kNASSCffx5lY9 8KNZiQze2t2EznbBEwtLERilfM7N1MMnQNP/SyHqmzTrt9TulQp16yM4vuk/iSW0wT/5o5oq3 Pj7ZVjYy6/bQVaKU9qnVFXnHz82DQQMOo5bvngYfVEoCXeyMdevuYn/xeO2C20RC0YQp4U7SG RRhjaZRpM+/yTmjrYx+JCjJrcdVtOx8Vx9GNrjNtuLVGMs8W4EDUK/DzN2cIjxfi7VhYFJPxm 0hGRejBQe6T3U2+RClX8+jOBnhpBm2dTBPfH6I2B1HieWCpqvXjhrE4hNXDfsjZmuOqez2wzi HX17tveLghW8MjJ6IgtnY4ImDaS1CDlZC8hEZUWvhyeHzu6s7+mql479iSF3/VZpPqMQ= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.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 --- 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 bab814d2f37d..d75ec64ae0b5 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) { omapdss_early_init_of(); diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 3c87e40650cf..f192fc7fd4f7 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -409,7 +409,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;