diff options
| author | Kees Cook <[email protected]> | 2021-07-11 16:51:01 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2021-07-23 09:04:03 +0200 |
| commit | 69aa1deeab47a47f1e7876fabb76e1e11496c418 (patch) | |
| tree | 8160d3840ce0189ba036a5e17d1ae2b29e76d745 /tools/perf/scripts/python | |
| parent | d27f346aa98fa8ba4fc6aa056240969ab34f9450 (diff) | |
media: atomisp: Perform a single memset() for union
There is no need to memset() both dvs_grid_info and dvs_stat_grid_info
separately: they are part of the same union. Instead, just zero the
union itself. This additionally avoids a false positive (due to a
gcc optimization bug[1]) when building with the coming FORTIFY_SOURCE
improvements:
In function 'fortify_memset_chk',
inlined from 'sh_css_pipe_get_grid_info' at drivers/staging/media/atomisp/pci/sh_css.c:5186:3,
inlined from 'ia_css_stream_create' at drivers/staging/media/atomisp/pci/sh_css.c:9442:10:
./include/linux/fortify-string.h:199:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
199 | __write_overflow_field();
| ^~~~~~~~~~~~~~~~~~~~~~~~
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419
Link: https://lore.kernel.org/linux-media/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions