drm/amd/display: return 'NULL' instead of 'false' from dcn20_acquire_idle_pipe_for_layer
Subsystems (3)
PATCH 1/1 drm/amd/display: return 'NULL' instead of 'false' from dcn20_acquire_idle_pipe_for_layer
clang complains that 'false' is a not a pointer:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:2428:10: error: expression which evaluates to zero treated as a null pointer constant of type 'struct pipe_ctx *' [-Werror,-Wnon-literal-null-conversion]
return false;
Changing it to 'NULL' looks like the right thing that will shut up the warning and make it easier to read, while not changing behavior.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +1 -1
@@ -2425,7 +2425,7 @@ struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(ASSERT (0 );if (!idle_pipe) -return false; +return NULL ; idle_pipe->stream = head_pipe->stream; idle_pipe->stream_res.tg = head_pipe->stream_res.tg;
Signature · 6 lines
2.20.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 11 lines · Arnd Bergmann
clang complains that 'false' is a not a pointer:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:2428:10: error: expression which evaluates to zero treated as a null pointer constant of type 'structpipe_ctx*' [-Werror,-Wnon-literal-null-conversion]return false;Changing it to 'NULL' looks like the right thing that will shut up the warning and make it easier to read, while not changing behavior.
Fixes 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource")Signed-off-by Arnd Bergmann <[email protected]>
Applied. Thanks!
Alex
Quoted 20 lines
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +1
-2@@ -2425,7 +2425,7 @@ struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer(ASSERT (0 );if (!idle_pipe) -return false; +return NULL ; idle_pipe->stream = head_pipe->stream; idle_pipe->stream_res.tg = head_pipe->stream_res.tg; --2.20.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Arnd Bergmann
clang complains that 'false' is a not a pointer:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:2428:10: error: expression which evaluates to zero treated as a null pointer constant of type 'structpipe_ctx*' [-Werror,-Wnon-literal-null-conversion]return false;Changing it to 'NULL' looks like the right thing that will shut up the warning and make it easier to read, while not changing behavior.
Fixes 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource")Signed-off-by Arnd Bergmann <[email protected]>