Received: by 10.223.185.116 with SMTP id b49csp1128239wrg; Fri, 23 Feb 2018 12:25:39 -0800 (PST) X-Google-Smtp-Source: AH8x2242D8l9Kjw26HsxGc/lrNXosyskYcel5WFM7SagMPRsvDxZkO1pBM/g8vpa6iMsb6+YolCk X-Received: by 10.99.125.78 with SMTP id m14mr2321071pgn.391.1519417539010; Fri, 23 Feb 2018 12:25:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417538; cv=none; d=google.com; s=arc-20160816; b=i049BqgOg8f/ZK5t6M8ljAewN9+V7lwtGWZhu0l/WDcJbw7RZRiDrwEkDyrrOxb6Uy EjYn8aBwLEfiH8p+ID0mBdTv1lbC0I2+g75Ac70+TlVSy8bc3iLcsbnpw6aAAN1frXRw IsC+svBZQuE6wmCuVFMcS5yzH28/kp0H/FJqjq7z7Wwaphzc1UCNgrh0PjC378cM1hgW juLiGe+tGja8utIl97rn/DtsPUeNBFqTNrZSNJR85JK2vavpv3D7iwqxy2d+jR4J3Yhn Pu/Nr/iqfX+geV1u24eK5JRBXL4x2x3LKkoCRMUq4b1Ebsb3DY/4jEYuO2ohz32r0OE/ BBng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Sf8IFVnsiinYnRs4/m1xXgTMXhpOMiXtPAcGrgXl8fU=; b=yeWu10jy1oxmkiUXGWTZZajwfTA7Cl/wg7t1ly8kJAfhtVsDcYfJOUkU3FYHwMTOr1 1O4U9vlrSGuJoC6WFCfaPBo08o1q+AUEEkSdeSfOcESb4awPdK3Vv/xXvw0W7psUIP0P 4EfFAwiio5XB7UmgqRAB3EO+ZA9DCeK41ljXgGC0PTZrRf5IGSJ6oReM8uRB5fS/eDsj jAp9x9u9SF/AgNGjzE7cHKFX3O1+85Q8L6DY3MxoK6cwBGYRaHfelckyL/WpJxR53hw1 a17T0GVWwm72jq3sUEe1chSeNwHk6WlIo2B+5EoKGaTg0iecG3BeYVrRdGciafjpYTY4 RalQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m27si2296309pfg.64.2018.02.23.12.25.24; Fri, 23 Feb 2018 12:25:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932290AbeBWSiB (ORCPT + 99 others); Fri, 23 Feb 2018 13:38:01 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38854 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932122AbeBWSh7 (ORCPT ); Fri, 23 Feb 2018 13:37:59 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BFC9AFA7; Fri, 23 Feb 2018 18:37:58 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Krzysztof Kozlowski , Herbert Xu Subject: [PATCH 4.4 112/193] hwrng: exynos - use __maybe_unused to hide pm functions Date: Fri, 23 Feb 2018 19:25:45 +0100 Message-Id: <20180223170343.450919460@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit b93f342da1766ef1740e6277508329356c4ea48b upstream. The exynos random driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/char/hw_random/exynos-rng.c:166:12: error: 'exynos_rng_suspend' defined but not used [-Werror=unused-function] drivers/char/hw_random/exynos-rng.c:171:12: error: 'exynos_rng_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/char/hw_random/exynos-rng.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -155,8 +155,7 @@ static int exynos_rng_probe(struct platf return ret; } -#ifdef CONFIG_PM -static int exynos_rng_runtime_suspend(struct device *dev) +static int __maybe_unused exynos_rng_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -166,7 +165,7 @@ static int exynos_rng_runtime_suspend(st return 0; } -static int exynos_rng_runtime_resume(struct device *dev) +static int __maybe_unused exynos_rng_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -174,12 +173,12 @@ static int exynos_rng_runtime_resume(str return clk_prepare_enable(exynos_rng->clk); } -static int exynos_rng_suspend(struct device *dev) +static int __maybe_unused exynos_rng_suspend(struct device *dev) { return pm_runtime_force_suspend(dev); } -static int exynos_rng_resume(struct device *dev) +static int __maybe_unused exynos_rng_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -191,7 +190,6 @@ static int exynos_rng_resume(struct devi return exynos_rng_configure(exynos_rng); } -#endif static const struct dev_pm_ops exynos_rng_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(exynos_rng_suspend, exynos_rng_resume)