From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org,
Boris Brezillon <bbrezillon@kernel.org>
Subject: Re: [PATCH 3/3] drm/atmel-hlcdc: Use swap() where appropriate
Date: Fri, 11 Oct 2019 19:07:34 +0300 [thread overview]
Message-ID: <20191011160734.GS1208@intel.com> (raw)
In-Reply-To: <20191010152428.40458dd0@dhcp-172-31-174-146.wireless.concordia.ca>
On Thu, Oct 10, 2019 at 03:24:28PM +0200, Boris Brezillon wrote:
> On Thu, 10 Oct 2019 16:11:59 +0300
> Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
>
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > @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>
>
> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Ta. Pushed to drm-misc-next.
>
> > ---
> > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> > index 89f5a756fa37..034f202dfe8f 100644
> > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> > @@ -601,7 +601,6 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
> > struct drm_framebuffer *fb = state->base.fb;
> > const struct drm_display_mode *mode;
> > struct drm_crtc_state *crtc_state;
> > - unsigned int tmp;
> > int ret;
> > 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
> > */
> > if (drm_rotation_90_or_270(state->base.rotation)) {
> > - tmp = state->src_w;
> > - state->src_w = state->src_h;
> > - state->src_h = tmp;
> > + swap(state->src_w, state->src_h);
> > }
> >
> > if (!desc->layout.size &&
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-10-11 16:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 13:11 [PATCH 1/3] drm/amd/display: Use swap() where appropriate Ville Syrjala
2019-10-10 13:11 ` [PATCH 3/3] drm/atmel-hlcdc: " Ville Syrjala
2019-10-10 13:24 ` Boris Brezillon
2019-10-11 16:07 ` Ville Syrjälä [this message]
[not found] ` <20191010131159.17346-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2019-10-10 13:11 ` [PATCH 2/3] drm/amdgpu/powerplay: " Ville Syrjala
2019-10-10 14:27 ` Alex Deucher
2019-10-10 13:47 ` [PATCH 1/3] drm/amd/display: " Kazlauskas, Nicholas
2019-10-10 14:24 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011160734.GS1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=bbrezillon@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox