From: Arnd Bergmann <arnd@arndb.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Bin Liu <b-liu@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tony Lindgren <tony@atomide.com>, Felipe Balbi <balbi@kernel.org>,
Johan Hovold <johan@kernel.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
USB list <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: musb: mark PM functions as __maybe_unused
Date: Mon, 28 Nov 2016 11:54:54 +0100 [thread overview]
Message-ID: <7174247.C7pj70tUDp@wuerfel> (raw)
In-Reply-To: <CAMuHMdWV8ZG0LqBrgPd8cgk9+ejW=A1r1JF8fq4FwfXVCPM6Jw@mail.gmail.com>
On Monday, November 28, 2016 11:51:37 AM CET Geert Uytterhoeven wrote:
> On Tue, Nov 22, 2016 at 3:30 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > Building without CONFIG_PM causes a harmless warning:
> >
> > drivers/usb/musb/musb_core.c:2041:12: error: ‘musb_run_resume_work’ defined but not used [-Werror=unused-function]
> >
> > Removing the #ifdef around the PM code and instead marking the suspend/resume
> > functions as __maybe_unused will do the right thing without warning.
> >
> > Fixes: ea2f35c01d5e ("usb: musb: Fix sleeping function called from invalid context for hdrc glue")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> linux-m68k-allmodconfig$ bloat-o-meter drivers/usb/musb/musb_core.o{.orig,}
> add/remove: 8/0 grow/shrink: 0/0 up/down: 2344/0 (2344)
> function old new delta
> musb_restore_context - 892 +892
> musb_save_context - 690 +690
> musb_run_resume_work - 190 +190
> musb_resume - 182 +182
> musb_runtime_resume - 148 +148
> musb_suspend - 114 +114
> musb_dev_pm_ops - 92 +92
> musb_runtime_suspend - 36 +36
> Total: Before=13091, After=15435, chg +17.91%
Well, in allmodconfig, you have CONFIG_PM enabled, so this is not
dead code but actually does what was intended (though possibly
not written as efficiently as it could have been).
In a configuration without CONFIG_PM, there should ideally be
no added code.
Arnd
next prev parent reply other threads:[~2016-11-28 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 14:30 Arnd Bergmann
2016-11-23 14:20 ` Tony Lindgren
2016-11-28 10:51 ` Geert Uytterhoeven
2016-11-28 10:54 ` Arnd Bergmann [this message]
2016-11-28 11:09 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7174247.C7pj70tUDp@wuerfel \
--to=arnd@arndb.de \
--cc=b-liu@ti.com \
--cc=balbi@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome