projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
981b304
)
drm/amd/display: fix application of sizeof to pointer
author
Lv Ruyi
<lv.ruyi@zte.com.cn>
Wed, 24 Nov 2021 03:04:26 +0000
(
03:04
+0000)
committer
Alex Deucher
<alexander.deucher@amd.com>
Wed, 1 Dec 2021 21:02:16 +0000
(16:02 -0500)
Both of split and merge are pointers, not arrays.
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c
b/drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c
index ece34b0b8a46a9686268239e9f8a805587ae01bc..91810aaee5a337ba4b54d5a3bcccb47b33b53092 100644
(file)
--- a/
drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c
+++ b/
drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c
@@
-1223,8
+1223,8
@@
static void dml_full_validate_bw_helper(struct dc *dc,
*pipe_cnt = dml_populate_dml_pipes_from_context(dc, context, pipes, false);
*vlevel = dml_get_voltage_level(&context->bw_ctx.dml, pipes, *pipe_cnt);
if (*vlevel < context->bw_ctx.dml.soc.num_states) {
- memset(split, 0,
sizeof(
split));
- memset(merge, 0,
sizeof(
merge));
+ memset(split, 0,
MAX_PIPES * sizeof(*
split));
+ memset(merge, 0,
MAX_PIPES * sizeof(*
merge));
*vlevel = dml_validate_apply_pipe_split_flags(dc, context, *vlevel, split, merge);
}