From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932849AbcK1KzZ convert rfc822-to-8bit (ORCPT ); Mon, 28 Nov 2016 05:55:25 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:61148 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932332AbcK1KzJ (ORCPT ); Mon, 28 Nov 2016 05:55:09 -0500 From: Arnd Bergmann To: Geert Uytterhoeven Cc: Bin Liu , Greg Kroah-Hartman , Tony Lindgren , Felipe Balbi , Johan Hovold , Rasmus Villemoes , USB list , "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 Message-ID: <7174247.C7pj70tUDp@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <20161122143028.1822041-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K0:9ct6T0tJdbjU4/KrqkcQfZ67IhxMLNDsGWjNbLZi7jn6R45keos fSspH5bUiANGJ/xWsU3fZGQ58tJWPerS+c2XKhdWtihcB5TpszHIicCg0RG9C5wsdEMUKUl n/hnSebAFBRH4ctkJFSLYphxaekaXAUyrG4F6pd2wA1yzO9srwmkgsxlZKjWMu39CvC38EB n/lqStDhkF9j1lrzOMRwQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:YYOU5IHowo0=:9EULEnpkQbe/K2h92PBLmi nyIIIX/mPR17cboS8TbXYorA550jZxvE7cfNSafmJw5ViRIrdce4aDTjpSnEvuF1euGrhFGmh tddseUCTrCuG+7IagHTiZ7mmM/2IUrEiiy6Rr40bySlFeI9QTnTECa4EjhXTablxMkudSZRqy drEbnGIhGgdMhDnXKmzKTrqgyLtfKS+zKktwePbCRQmx2gPGTOfWim65CLT77MJnfRgaHVAQk xyI1OdUId81w+Cgk6hkUyFn0Z3MJzIlsEQlOAT/tQgwFU5Kf3NtYSj+vPHNlARfTWcqq902XB CpIok4l+QJ2lbcl5eCllfseU1us6Q/JjLkFaxSW9nosfWTAFn8uvgkr+7o9LGLLm7pq7fXYSg wBgNPta7lf0dX8dngVvUYlZSOew1KJt7BIyi69ZE6N6U3NqdS6ET33DvTHAnbFqKb3TRdxhDi pQex5ZWYrCOqdNeBFX/aqPYU5PlJoTWdd8m+I3BV5zpUc4+hj1imHiYJhHsD9efw/5oPCFvz6 2kEv2cJllKFsMRpPt0jucUqIH5gDJO9Pf3sj8uJOxfDoKeMKGtHw2SbxCSbnHlWwwwSasPFQy ROKckYj1snXn+mnvw6V3aO2yYyOwjSkLtqGw7gY6mPbaQoVcYYOwaPqxOtcUZxrhl7xS1I/uk 27eowXBfbIGLcnuSpw3uSriMpSOLZy07R8tw44QuKbB8gZZ39RrlLkSd9qKlpxOmH+9PvEb88 HKViVyq4smrdzMBS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, November 28, 2016 11:51:37 AM CET Geert Uytterhoeven wrote: > On Tue, Nov 22, 2016 at 3:30 PM, Arnd Bergmann 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 > > 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