OSDN Git Service

drm/amdgpu/powerplay: Use swap() where appropriate
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 10 Oct 2019 13:11:58 +0000 (16:11 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Oct 2019 00:39:07 +0000 (19:39 -0500)
commitff06184a49fde886bcb6150168905e334e22650c
tree22c15420fc3950384e0e7e5eed74ced3671a4fad
parent34b86b75dfc90ab3d996c224314ce51772a3b351
drm/amdgpu/powerplay: Use swap() where appropriate

@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: Rex Zhu <rex.zhu@amd.com>
Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c