lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 24 Aug 2020 21:32:34 +0800 From: Bard Liao <yung-chuan.liao@...ux.intel.com> To: alsa-devel@...a-project.org, vkoul@...nel.org Cc: vinod.koul@...aro.org, linux-kernel@...r.kernel.org, tiwai@...e.de, broonie@...nel.org, gregkh@...uxfoundation.org, jank@...ence.com, srinivas.kandagatla@...aro.org, rander.wang@...ux.intel.com, ranjani.sridharan@...ux.intel.com, hui.wang@...onical.com, pierre-louis.bossart@...ux.intel.com, sanyog.r.kale@...el.com, mengdong.lin@...el.com, bard.liao@...el.com Subject: [PATCH v2] soundwire: intel: fix intel_suspend/resume defined but not used warning When CONFIG_PM_SLEEP is not defined, GCC throws compilation warnings: drivers/soundwire/intel.c:1799:12: warning: ‘intel_resume’ defined but not used [-Wunused-function] static int intel_resume(struct device *dev) ^~~~~~~~~~~~ drivers/soundwire/intel.c:1683:12: warning: ‘intel_suspend’ defined but not used [-Wunused-function] static int intel_suspend(struct device *dev) ^~~~~~~~~~~~~ Fix by using __maybe_unused macro. Suggested-by: Vinod Koul <vkoul@...nel.org> Signed-off-by: Bard Liao <yung-chuan.liao@...ux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com> --- Changelog: v2: - use __maybe_unused macro instead of wrapping in another ifdef. --- drivers/soundwire/intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index dbcbe2708563..ebca8ced59ec 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1527,7 +1527,7 @@ int intel_master_process_wakeen_event(struct platform_device *pdev) #ifdef CONFIG_PM -static int intel_suspend(struct device *dev) +static int __maybe_unused intel_suspend(struct device *dev) { struct sdw_cdns *cdns = dev_get_drvdata(dev); struct sdw_intel *sdw = cdns_to_intel(cdns); @@ -1625,7 +1625,7 @@ static int intel_suspend_runtime(struct device *dev) return ret; } -static int intel_resume(struct device *dev) +static int __maybe_unused intel_resume(struct device *dev) { struct sdw_cdns *cdns = dev_get_drvdata(dev); struct sdw_intel *sdw = cdns_to_intel(cdns); -- 2.17.1
Powered by blists - more mailing lists