From patchwork Mon Jul 13 01:04:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 6773591 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@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 9805C9F2F0 for ; Mon, 13 Jul 2015 01:04:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6158220632 for ; Mon, 13 Jul 2015 01:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C17A4205FC for ; Mon, 13 Jul 2015 01:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751480AbbGMBEM (ORCPT ); Sun, 12 Jul 2015 21:04:12 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:49632 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751410AbbGMBEL (ORCPT ); Sun, 12 Jul 2015 21:04:11 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p7166-ipbfp1503kobeminato.hyogo.ocn.ne.jp [114.153.234.166]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 240FA25B73B; Mon, 13 Jul 2015 11:04:09 +1000 (AEST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 09AF0EDEAA3; Mon, 13 Jul 2015 10:04:06 +0900 (JST) Date: Mon, 13 Jul 2015 10:04:06 +0900 From: Simon Horman To: Wolfram Sang Cc: linux-sh@vger.kernel.org, Magnus Damm , Laurent Pinchart , Geert Uytterhoeven Subject: Re: [PATCH] ARM: shmobile: apmu: silence build warnings Message-ID: <20150713010406.GA25443@verge.net.au> References: <1436561296-29141-1-git-send-email-wsa@the-dreams.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1436561296-29141-1-git-send-email-wsa@the-dreams.de> Organisation: Horms Solutions Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.3 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 Hi Wolfram, On Fri, Jul 10, 2015 at 10:48:16PM +0200, Wolfram Sang wrote: > From: Wolfram Sang > > With shmobile_defconfig but SMP=n && SUSPEND=n, I get: > > arch/arm/mach-shmobile/platsmp-apmu.c:49:12: warning: 'apmu_power_off' defined but not used [-Wunused-function] > arch/arm/mach-shmobile/platsmp-apmu.c:70:12: warning: 'apmu_wrap' defined but not used [-Wunused-function] > > Annotate those functions like the functions around it. thanks for noticing this. I'm not familiar with when it is appropriate to use __maybe_unused but does anything speak against using #if as per the conditional compilation of the callers in platsmp-apmu.c of the above functions? --- 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 diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c index b0790fc32282..54cf153b570f 100644 --- a/arch/arm/mach-shmobile/platsmp-apmu.c +++ b/arch/arm/mach-shmobile/platsmp-apmu.c @@ -46,12 +46,14 @@ static int __maybe_unused apmu_power_on(void __iomem *p, int bit) return 0; } +#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) static int apmu_power_off(void __iomem *p, int bit) { /* request Core Standby for next WFI */ writel_relaxed(3, p + CPUNCR_OFFS(bit)); return 0; } +#endif static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) { @@ -67,12 +69,14 @@ static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit) return 0; } +#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND) || defined(CONFIG_SMP) static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu)) { void __iomem *p = apmu_cpus[cpu].iomem; return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL; } +#endif static void apmu_init_cpu(struct resource *res, int cpu, int bit) {