Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -4
+1 -4
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
··· 601 601 struct drm_framebuffer *fb = state->base.fb; 602 602 const struct drm_display_mode *mode; 603 603 struct drm_crtc_state *crtc_state; 604 - unsigned int tmp; 605 604 int ret; 606 605 int i; 607 606 ··· 693 694 * Swap width and size in case of 90 or 270 degrees rotation 694 695 */ 695 696 if (drm_rotation_90_or_270(state->base.rotation)) { 696 - tmp = state->src_w; 697 - state->src_w = state->src_h; 698 - state->src_h = tmp; 697 + swap(state->src_w, state->src_h); 699 698 } 700 699 701 700 if (!desc->layout.size &&