From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422743AbcKPLOb (ORCPT ); Wed, 16 Nov 2016 06:14:31 -0500 Received: from mga09.intel.com ([134.134.136.24]:40076 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422667AbcKPLOa (ORCPT ); Wed, 16 Nov 2016 06:14:30 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,647,1473145200"; d="asc'?scan'208";a="31507999" From: Felipe Balbi To: Arnd Bergmann , Greg Kroah-Hartman Cc: Arnd Bergmann , Heikki Krogerus , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dwc3: make PM functions as __maybe_unused In-Reply-To: <20161115160555.847337-1-arnd@arndb.de> References: <20161115160555.847337-1-arnd@arndb.de> Date: Wed, 16 Nov 2016 13:13:48 +0200 Message-ID: <87polvu177.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Arnd Bergmann writes: > A change to the suspend/resume handling in dwc3-pci introduced a > harmless warning: > > drivers/usb/dwc3/dwc3-pci.c:169:12: error: =E2=80=98dwc3_pci_dsm=E2=80=99= defined but not used [-Werror=3Dunused-function] > > Replacing the #ifdef around the PM functions with __maybe_unused > annotations is the easiest way to make sure this doesn't happen > again. A similar problem happened two months earlier and we > ended up updating the #ifdef, but as it has come back now, > I'd suggest going back to my earlier approach. > > Fixes: 9cecca75b5a0 ("usb: dwc3: pci: call _DSM for suspend/resume") > Link: https://patchwork.kernel.org/patch/9318887/ > Signed-off-by: Arnd Bergmann I'll just move the ifdef around. We really need a real fix for this. Why couldn't we just always add PM callbacks and assume they won't be used if !PM && !PM_SLEEP? Adding __maybe_unused everywhere is rather unelegant :-( =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlgsP2wACgkQzL64meEa mQbzeQ//cBpM9MeZ9RS+HMlg2OWDyGxMJHumuOiwz2O9lgxtcRK8f8aNLP/vqfdf FgN9WJhl2xdf9Ath7TLTbh9cWr+VZDFoRgirkKdFu/T9AkQijLrDE9LXcDJixZI8 m7QC8+iDTE6qycIWTUT26MghVXYwf52/YGElNpagp1RXZb3SuYFSg+RbOSDDrq9u lteFrsU6rpzVeKYFV2PPMM9FwC3olcMV7An35zS+CzxFQ9h2nlI0xMfG9MP9LI3b el+XeQ6c8Aipy3iRmi1HdjhxFqJkdnWKp/SJw1FUx78GC/c73iMfcpp0BXgMMRED syjt8WwarOhozmu1B3ppI8ZityHMVHJBcJFal8LgWTHsR0mfENT9hwdifJZmcnSF HXxdWJDefeV1KJG3gcMzUTw0/SPS97E5ZSLT/XlWV+UocXoz+vMy+VnrAt7Cjvit +2aG+JASTsf69VtqK4KhhCcl9eatUmimsdzEYnLGa4ZPkpD5BN3RxVEp0O67Gn7P IOel/NiJy1/hEFS5M+JSJXOSpE8gwdProAc9X413gNpRGOH9KtOI+toed1Js0kUf StqK5fdNrXHCHEZhRq0Pz99EKcl4G4vLk/44+66ZsS9cG6c/jMdliX4di3JXdzqd H8ieLg59Ua/0DfXNPd8+EyrTvEb+jmBvCOwXjxKlvWaydqpi3T8= =LI17 -----END PGP SIGNATURE----- --=-=-=--