diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-02-18 13:04:02 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-04-12 09:26:08 +0300 |
commit | 563c4a7599d8ac0f6826b33f312d886eda7938aa (patch) | |
tree | cca4b6db5262490352be5dc900d3f8bdd60ac8c0 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 73c3ed7495c67b8fbdc31cf58e6ca8757df31a33 (diff) | |
download | linux-563c4a7599d8ac0f6826b33f312d886eda7938aa.tar.xz |
drm: 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-22-ville.syrjala@linux.intel.com
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions