drm/atmel-hlcdc: 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: Sam Ravnborg <sam@ravnborg.org> Cc: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191010131159.17346-3-ville.syrjala@linux.intel.com Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
This commit is contained in:
parent
23b4822528
commit
695379b373
@ -601,7 +601,6 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
|
|||||||
struct drm_framebuffer *fb = state->base.fb;
|
struct drm_framebuffer *fb = state->base.fb;
|
||||||
const struct drm_display_mode *mode;
|
const struct drm_display_mode *mode;
|
||||||
struct drm_crtc_state *crtc_state;
|
struct drm_crtc_state *crtc_state;
|
||||||
unsigned int tmp;
|
|
||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -694,9 +693,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
|
|||||||
* Swap width and size in case of 90 or 270 degrees rotation
|
* Swap width and size in case of 90 or 270 degrees rotation
|
||||||
*/
|
*/
|
||||||
if (drm_rotation_90_or_270(state->base.rotation)) {
|
if (drm_rotation_90_or_270(state->base.rotation)) {
|
||||||
tmp = state->src_w;
|
swap(state->src_w, state->src_h);
|
||||||
state->src_w = state->src_h;
|
|
||||||
state->src_h = tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!desc->layout.size &&
|
if (!desc->layout.size &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user