diff options
author | 2022-02-18 12:03:59 +0200 | |
---|---|---|
committer | 2022-05-05 18:23:55 +0300 | |
commit | bb7acf59a11e013b5d548215918df9eb27dd35b2 (patch) | |
tree | d97a32e6aeaf2d9e27ae4dcf1190e7fc676c38d2 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | drm/i915: warn about missing ->get_buf_trans initialization (diff) | |
download | linux-dev-bb7acf59a11e013b5d548215918df9eb27dd35b2.tar.xz linux-dev-bb7acf59a11e013b5d548215918df9eb27dd35b2.zip |
drm/i915: Use drm_mode_init() for on-stack modes
Initialize on-stack modes with drm_mode_init() to guarantee
no stack garbage in the list head, or that we aren't copying
over another mode's list head.
Based on the following cocci script, with manual fixups:
@decl@
identifier M;
expression E;
@@
- struct drm_display_mode M = E;
+ struct drm_display_mode M;
@@
identifier decl.M;
expression decl.E;
statement S, S1;
@@
struct drm_display_mode M;
... when != S
+ drm_mode_init(&M, &E);
+
S1
@@
expression decl.E;
@@
- &*E
+ E
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220218100403.7028-19-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions