diff options
| author | Ville Syrjälä <[email protected]> | 2019-10-10 13:11:57 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-10-11 00:39:06 +0000 |
| commit | 34b86b75dfc90ab3d996c224314ce51772a3b351 (patch) | |
| tree | 0fa24afb0f5ec4ed001afae72b8e3e8d13ec7e1e /drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | |
| parent | drm/amdgpu: Do not implement power-on for SDMA after do mode2 reset on Renoir (diff) | |
| download | kernel-34b86b75dfc90ab3d996c224314ce51772a3b351.tar.gz kernel-34b86b75dfc90ab3d996c224314ce51772a3b351.zip | |
drm/amd/display: Use swap() where appropriate
Mostly a cocci-job, but it flat out refused to remove the
declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so
had to do that part manually.
@swap@
identifier TEMP;
expression A,B;
@@
- TEMP = A;
- A = B;
- B = TEMP;
+ swap(A, B);
@@
type T;
identifier swap.TEMP;
@@
(
- T TEMP;
|
- T TEMP = {...};
)
... when != TEMP
Cc: Harry Wentland <[email protected]>
Cc: Leo Li <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: "David (ChunMing) Zhou" <[email protected]>
Cc: [email protected]
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/bios/bios_parser.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index 221e0f56389f..823843cd2613 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -2543,7 +2543,6 @@ static enum bp_result construct_integrated_info( /* Sort voltage table from low to high*/ if (result == BP_RESULT_OK) { - struct clock_voltage_caps temp = {0, 0}; uint32_t i; uint32_t j; @@ -2553,10 +2552,8 @@ static enum bp_result construct_integrated_info( info->disp_clk_voltage[j].max_supported_clk < info->disp_clk_voltage[j-1].max_supported_clk) { /* swap j and j - 1*/ - temp = info->disp_clk_voltage[j-1]; - info->disp_clk_voltage[j-1] = - info->disp_clk_voltage[j]; - info->disp_clk_voltage[j] = temp; + swap(info->disp_clk_voltage[j - 1], + info->disp_clk_voltage[j]); } } } |
