* [PATCH 1/3] drm/msm: remove unused variable
@ 2017-08-03 11:50 Arnd Bergmann
[not found] ` <20170803115130.3448850-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-08-03 11:50 ` Arnd Bergmann
0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-08-03 11:50 UTC (permalink / raw)
To: Rob Clark, Jordan Crouse
Cc: Arnd Bergmann, David Airlie, Bjorn Andersson, linux-arm-msm,
dri-devel, freedreno, linux-kernel
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(-)
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;
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] drm/msm/mdp5: mark runtime_pm functions as __maybe_unused
2017-08-03 11:50 [PATCH 1/3] drm/msm: remove unused variable Arnd Bergmann
@ 2017-08-03 11:50 ` Arnd Bergmann
2017-08-03 11:50 ` Arnd Bergmann
1 sibling, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-08-03 11:50 UTC (permalink / raw)
To: Rob Clark, Archit Taneja
Cc: Arnd Bergmann, Neil Armstrong, David Airlie, Daniel Vetter,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
Ville Syrjälä
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.
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);
--
2.9.0
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] drm/msm/mdp5: mark runtime_pm functions as __maybe_unused
@ 2017-08-03 11:50 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-08-03 11:50 UTC (permalink / raw)
To: Rob Clark, Archit Taneja
Cc: Arnd Bergmann, David Airlie, Daniel Vetter, Neil Armstrong,
Ville Syrjälä,
linux-arm-msm, dri-devel, freedreno, linux-kernel
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.
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);
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/msm: use %z format modifier for printing size_t
2017-08-03 11:50 [PATCH 1/3] drm/msm: remove unused variable Arnd Bergmann
@ 2017-08-03 11:50 ` Arnd Bergmann
2017-08-03 11:50 ` Arnd Bergmann
1 sibling, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-08-03 11:50 UTC (permalink / raw)
To: Rob Clark
Cc: Arnd Bergmann, linux-arm-msm, linux-kernel, dri-devel, freedreno
The return type of ARRAY_SIZE() is size_t, so we have to use
%zu instead of %lu to avoid this warning:
drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_init':
drivers/gpu/drm/msm/msm_gpu.c:742:31: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=]
The warning it otherwise harmless as size_t is always the
same size as unsigned long in all supported architectures,
but gcc doesn't know that.
Fixes: c2fceabca6d5 ("drm/msm: Support multiple ringbuffers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/msm/msm_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 1e44f8893490..66af5ac334ba 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -739,7 +739,7 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
}
if (nr_rings > ARRAY_SIZE(gpu->rb)) {
- DRM_DEV_INFO_ONCE(drm->dev, "Only creating %lu ringbuffers\n",
+ DRM_DEV_INFO_ONCE(drm->dev, "Only creating %zu ringbuffers\n",
ARRAY_SIZE(gpu->rb));
nr_rings = ARRAY_SIZE(gpu->rb);
}
--
2.9.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/msm: use %z format modifier for printing size_t
@ 2017-08-03 11:50 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2017-08-03 11:50 UTC (permalink / raw)
To: Rob Clark
Cc: Arnd Bergmann, David Airlie, Jordan Crouse, linux-arm-msm,
dri-devel, freedreno, linux-kernel
The return type of ARRAY_SIZE() is size_t, so we have to use
%zu instead of %lu to avoid this warning:
drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_init':
drivers/gpu/drm/msm/msm_gpu.c:742:31: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=]
The warning it otherwise harmless as size_t is always the
same size as unsigned long in all supported architectures,
but gcc doesn't know that.
Fixes: c2fceabca6d5 ("drm/msm: Support multiple ringbuffers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/msm/msm_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 1e44f8893490..66af5ac334ba 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -739,7 +739,7 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
}
if (nr_rings > ARRAY_SIZE(gpu->rb)) {
- DRM_DEV_INFO_ONCE(drm->dev, "Only creating %lu ringbuffers\n",
+ DRM_DEV_INFO_ONCE(drm->dev, "Only creating %zu ringbuffers\n",
ARRAY_SIZE(gpu->rb));
nr_rings = ARRAY_SIZE(gpu->rb);
}
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] drm/msm/mdp5: mark runtime_pm functions as __maybe_unused
2017-08-03 11:50 ` Arnd Bergmann
(?)
@ 2017-08-04 10:37 ` Archit Taneja
-1 siblings, 0 replies; 6+ messages in thread
From: Archit Taneja @ 2017-08-04 10:37 UTC (permalink / raw)
To: Arnd Bergmann, Rob Clark
Cc: David Airlie, Daniel Vetter, Neil Armstrong,
Ville Syrjälä,
linux-arm-msm, dri-devel, freedreno, linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-04 10:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 11:50 [PATCH 1/3] drm/msm: remove unused variable Arnd Bergmann
[not found] ` <20170803115130.3448850-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-08-03 11:50 ` [PATCH 2/3] drm/msm/mdp5: mark runtime_pm functions as __maybe_unused Arnd Bergmann
2017-08-03 11:50 ` Arnd Bergmann
2017-08-04 10:37 ` Archit Taneja
2017-08-03 11:50 ` [PATCH 3/3] drm/msm: use %z format modifier for printing size_t Arnd Bergmann
2017-08-03 11:50 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.