Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1531200 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2016-11-28 12:00 +0100 |
| Last post | 2016-11-28 12:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] usb: musb: mark PM functions as __maybe_unused Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-28 12:00 +0100
Re: [PATCH] usb: musb: mark PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-11-28 12:00 +0100
Re: [PATCH] usb: musb: mark PM functions as __maybe_unused Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-28 12:20 +0100
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2016-11-28 12:00 +0100 |
| Subject | Re: [PATCH] usb: musb: mark PM functions as __maybe_unused |
| Message-ID | <sIrPb-12d-3@gated-at.bofh.it> |
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%
Doh...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-11-28 12:00 +0100 |
| Message-ID | <sIrPc-12d-31@gated-at.bofh.it> |
| In reply to | #1531200 |
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
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2016-11-28 12:20 +0100 |
| Message-ID | <sIs8y-1nY-15@gated-at.bofh.it> |
| In reply to | #1531207 |
Hi Arnd,
On Mon, Nov 28, 2016 at 11:54 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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).
M68k does not have CONFIG_PM.
> In a configuration without CONFIG_PM, there should ideally be
> no added code.
Apparently not :-(
BTW, same result for allyesconfig.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web