* [PATCH] drm/amdgpu/vi: silence an uninitialized variable warning
@ 2019-10-17 9:12 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-10-17 9:12 UTC (permalink / raw)
To: Rex Zhu, Jim Qu
Cc: David Airlie, kernel-janitors, amd-gfx, dri-devel, Alex Deucher,
Evan Quan, Christian König
Smatch complains that we need to initialized "*cap" otherwise it can
lead to an uninitialized variable bug in the caller. This seems like a
reasonable warning and it doesn't hurt to silence it at least.
drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'.
Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 83196b79edd5..f4ff15378e61 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1421,6 +1421,7 @@ static int pp_get_asic_baco_capability(void *handle, bool *cap)
{
struct pp_hwmgr *hwmgr = handle;
+ *cap = false;
if (!hwmgr)
return -EINVAL;
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] drm/amdgpu/vi: silence an uninitialized variable warning
@ 2019-10-17 9:12 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-10-17 9:12 UTC (permalink / raw)
To: Rex Zhu, Jim Qu
Cc: David Airlie, kernel-janitors, amd-gfx, dri-devel, Alex Deucher,
Evan Quan, Christian König
Smatch complains that we need to initialized "*cap" otherwise it can
lead to an uninitialized variable bug in the caller. This seems like a
reasonable warning and it doesn't hurt to silence it at least.
drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'.
Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 83196b79edd5..f4ff15378e61 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1421,6 +1421,7 @@ static int pp_get_asic_baco_capability(void *handle, bool *cap)
{
struct pp_hwmgr *hwmgr = handle;
+ *cap = false;
if (!hwmgr)
return -EINVAL;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drm/amdgpu/vi: silence an uninitialized variable warning
2019-10-17 9:12 ` Dan Carpenter
@ 2019-10-17 19:39 ` Alex Deucher
-1 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2019-10-17 19:39 UTC (permalink / raw)
To: Dan Carpenter
Cc: David (ChunMing) Zhou, David Airlie,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, amd-gfx list, Jim Qu,
Maling list - DRI developers, Daniel Vetter, Alex Deucher,
Evan Quan, Rex Zhu, Christian König
On Thu, Oct 17, 2019 at 5:12 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Smatch complains that we need to initialized "*cap" otherwise it can
> lead to an uninitialized variable bug in the caller. This seems like a
> reasonable warning and it doesn't hurt to silence it at least.
>
> drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'.
>
> Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 83196b79edd5..f4ff15378e61 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1421,6 +1421,7 @@ static int pp_get_asic_baco_capability(void *handle, bool *cap)
> {
> struct pp_hwmgr *hwmgr = handle;
>
> + *cap = false;
> if (!hwmgr)
> return -EINVAL;
>
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm/amdgpu/vi: silence an uninitialized variable warning
@ 2019-10-17 19:39 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2019-10-17 19:39 UTC (permalink / raw)
To: Dan Carpenter
Cc: David (ChunMing) Zhou, David Airlie,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, amd-gfx list, Jim Qu,
Maling list - DRI developers, Daniel Vetter, Alex Deucher,
Evan Quan, Rex Zhu, Christian König
On Thu, Oct 17, 2019 at 5:12 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Smatch complains that we need to initialized "*cap" otherwise it can
> lead to an uninitialized variable bug in the caller. This seems like a
> reasonable warning and it doesn't hurt to silence it at least.
>
> drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'.
>
> Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 83196b79edd5..f4ff15378e61 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1421,6 +1421,7 @@ static int pp_get_asic_baco_capability(void *handle, bool *cap)
> {
> struct pp_hwmgr *hwmgr = handle;
>
> + *cap = false;
> if (!hwmgr)
> return -EINVAL;
>
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-17 19:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-17 9:12 [PATCH] drm/amdgpu/vi: silence an uninitialized variable warning Dan Carpenter
2019-10-17 9:12 ` Dan Carpenter
2019-10-17 19:39 ` Alex Deucher
2019-10-17 19:39 ` Alex Deucher
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.