diff options
| author | Ville Syrjälä <[email protected]> | 2022-11-07 19:25:39 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-11-10 20:29:56 +0000 |
| commit | 0a204ce0e698e5b94a064de6848b8c4641860f64 (patch) | |
| tree | ff5b6a6efbd812288bbb48290a5c941a50980e62 /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |
| parent | drm/amdgpu: Ignore stop rlc on SRIOV environment. (diff) | |
| download | kernel-0a204ce0e698e5b94a064de6848b8c4641860f64.tar.gz kernel-0a204ce0e698e5b94a064de6848b8c4641860f64.zip | |
drm/amdgpu: 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
Cc: Harry Wentland <[email protected]>
Cc: Leo Li <[email protected]>
Cc: Rodrigo Siqueira <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
0 files changed, 0 insertions, 0 deletions
