From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756830AbcGZO2q (ORCPT ); Tue, 26 Jul 2016 10:28:46 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:63060 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754552AbcGZO2p (ORCPT ); Tue, 26 Jul 2016 10:28:45 -0400 From: Arnd Bergmann To: Dong Aisheng Cc: Adrian Hunter , Ulf Hansson , Dong Aisheng , Haibo Chen , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Date: Tue, 26 Jul 2016 16:28:28 +0200 Message-ID: <5892795.2gjnivGOlz@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-28-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <20160726123246.879426-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:t1L2SkM+KVCX4PZE5AWjOikk4Za7JxRHvUilKfXhc7oIQHypdr2 2Anoyo32ahMa8gp+EVAp2quQ0r/Q3jLprsXSKgnx3hJ7dCz2P34Q7Q5vCQwoRlzW8q6BOu/ 1MrFtOkq70XMC+d5G6ekYA9/IlaKI75Q8uFT8E2oJX52pfw3v54dSFVHOXBaf7sF1hmIVmE 7M8vbr+C5/Y7Gn3OKA6Og== X-UI-Out-Filterresults: notjunk:1;V01:K0:n2wVj6me5w4=:fUSD6+fDCEd8Oozta9U/d1 j9mVhiRgeB+5RXJ38H+baymiYyWiSfF1AF2tGz0oEj/HVgASGQHfFn9oH8KUrRlfUR+TQHjEY 83j/ttGE5G0KYE3asxwhqNy8xFSrk+LgomY/KV6hXYXmPCnSx1iQ30sYgy0HF+HGfRzInkgq7 KDgHd4MnNTu8GgY/EtTCeaIChcAKdxIzZrMNjj3Zl4ndOfvCpJkznPN9jcnzVtCbCStuFpRhg 9zqd0rEJ2mlD+DjR9J+issDscBSmibJWU6aMrflU8DBasoBml8VGVaXY/GRL5yDhhA/cruK5N NPpgnc6Ir03cxtBzyb9Hqz6feZqwMVTllDjQSy1iALTpnH992vEZCagDi3UagHxO4sXRkIfeN a+yGO7XRVwWSrkR4F8Q+sY3FeRXRre3Stsb8IP34x7vECiR2KI/WyyLZjl3/YDP+1jtsnAYHa PK+NJW1c178G2k0sLU7nedSpHSLTEsgPsRP6wvLNwKR2jxX3ECvE0Y3AKDgXR1d/c1wqHCnYY dLZLu+4VLcAgrfEECB9KkWk2mmTHos2lK7brQGqacEgIdMa2C+KpUF/pmnbfl5lhiL3c/Z/h2 kQ/A+oIObwwtEg3J564uSgcRpbjXBckbmElmZhYwp/aL158VJ2PNjPZheEnynfrnQgp3ZJRDq 2aPzOc1LnnaR3LrdZXJmYQTMNy6DjsFBwnCb9NmZX3OYjxT0BcYeNmOKqBphHIO/twHYuU8Va eHtd+snVhWp0FtwG Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, July 26, 2016 9:41:50 PM CEST Dong Aisheng wrote: > > On Tue, Jul 26, 2016 at 8:32 PM, Arnd Bergmann wrote: > > The driver has just gained a slightly incorrect pm-sleep implementation that causes > > warnings when CONFIG_PM is set but CONFIG_PM_SLEEP is not: > > > > drivers/mmc/host/sdhci-esdhc-imx.c:1302:12: error: 'sdhci_esdhc_resume' defined but not used [-Werror=unused-function] > > static int sdhci_esdhc_resume(struct device *dev) > > ^~~~~~~~~~~~~~~~~~ > > drivers/mmc/host/sdhci-esdhc-imx.c:1297:12: error: 'sdhci_esdhc_suspend' defined but not used [-Werror=unused-function] > > static int sdhci_esdhc_suspend(struct device *dev) > > > > This replaces the incorrect #ifdef with a __maybe_unused annotation that does > > the right thing in all configurations and is more readable. > > > > Signed-off-by: Arnd Bergmann > > Fixes: b70d0b3b5b29 ("mmc: sdhci-esdhc-imx: add esdhc specific suspend resume callback") > > Thanks for the fix. > Looks like the default kernel Makefile does not enable > -Werror=unused-function wanrings, > so did not expose it before. They are enabled by default as warnings, not errors. My test build setup uses -Werror to turn all warnings into errors so I can catch them more easily as failed builds. > Acked-by: Dong Aisheng > Thanks, Arnd