[1/3] drm/msm: remove unused variable

Message ID 20170803115130.3448850-1-arnd@arndb.de
State New
Headers show
Series
  • [1/3] drm/msm: remove unused variable
Related show

Commit Message

Arnd Bergmann Aug. 3, 2017, 11:50 a.m.
A cleanup left behind an unused variable that we have to remove
in order to avoid this harmless warning:

drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function 'a5xx_zap_shader_init':
drivers/gpu/drm/msm/adreno/a5xx_gpu.c:493:19: error: unused variable 'a5xx_gpu' [-Werror=unused-variable]

Fixes: 8d6f08272b6f ("drm/msm: Remove uneeded platform dev members")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 1 -
 1 file changed, 1 deletion(-)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Archit Taneja Aug. 4, 2017, 10:37 a.m. | #1
On 08/03/2017 05:20 PM, Arnd Bergmann wrote:
> When CONFIG_PM is disabled, we get harmless warnings about unused

> functions:

> 

> drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1025:12: error: 'mdp5_runtime_resume' defined but not used [-Werror=unused-function]

>   static int mdp5_runtime_resume(struct device *dev)

>              ^~~~~~~~~~~~~~~~~~~

> drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1015:12: error: 'mdp5_runtime_suspend' defined but not used [-Werror=unused-function]

>   static int mdp5_runtime_suspend(struct device *dev)

>              ^~~~~~~~~~~~~~~~~~~~

> 

> This marks both functions as __maybe_unused so the compiler

> can drop them silently.


Thanks for the fix. Since the commit is still in Rob's -next branch,
I'll post a new version which fixes this.

Archit

> 

> Fixes: d68fe15b1878 ("drm/msm/mdp5: Use runtime PM get/put API instead of toggling clocks")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>   drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 4 ++--

>   1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c

> index 9f9d95f7c80f..f7c0698fec40 100644

> --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c

> +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c

> @@ -1012,7 +1012,7 @@ static int mdp5_dev_remove(struct platform_device *pdev)

>   	return 0;

>   }

>   

> -static int mdp5_runtime_suspend(struct device *dev)

> +static __maybe_unused int mdp5_runtime_suspend(struct device *dev)

>   {

>   	struct platform_device *pdev = to_platform_device(dev);

>   	struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev);

> @@ -1022,7 +1022,7 @@ static int mdp5_runtime_suspend(struct device *dev)

>   	return mdp5_disable(mdp5_kms);

>   }

>   

> -static int mdp5_runtime_resume(struct device *dev)

> +static __maybe_unused int mdp5_runtime_resume(struct device *dev)

>   {

>   	struct platform_device *pdev = to_platform_device(dev);

>   	struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev);

> 


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index ea0f6e5b3b1e..a0f69b2e593a 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -490,7 +490,6 @@  static int a5xx_zap_shader_init(struct msm_gpu *gpu)
 {
 	static bool loaded;
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
-	struct a5xx_gpu *a5xx_gpu = to_a5xx_gpu(adreno_gpu);
 	struct platform_device *pdev = gpu->pdev;
 	int ret;