From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: davidcomponentone@gmail.com
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Arnd Bergmann <arnd@arndb.de>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Julia Lawall <Julia.Lawall@inria.fr>,
Yang Guang <yang.guang5@zte.com.cn>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: use swap() to make code cleaner
Date: Thu, 4 Nov 2021 12:43:23 +0200 [thread overview]
Message-ID: <CAHp75VdZLdJS2SLijO+Ff-8OM+fBvS-R1er5ByYuw38qrRXRwA@mail.gmail.com> (raw)
In-Reply-To: <20211103083337.387083-1-yang.guang5@zte.com.cn>
On Wed, Nov 3, 2021 at 10:34 AM <davidcomponentone@gmail.com> wrote:
> Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
> opencoding it.
Same comments as per all your valuable contributions: just think more
about the code that you are dealing with!
> if (dev->fmt->uvswap) {
> - tmp = base2;
> - base2 = base3;
> - base3 = tmp;
> + swap(base2, base3);
> }
Have you run checkpatch? What did it say?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-11-04 10:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 8:33 davidcomponentone
2021-11-03 15:14 ` Kieran Bingham
2021-11-04 0:26 ` David Yang
2021-11-04 10:43 ` Andy Shevchenko [this message]
2021-11-08 9:16 ` Hans Verkuil
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=CAHp75VdZLdJS2SLijO+Ff-8OM+fBvS-R1er5ByYuw38qrRXRwA@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Julia.Lawall@inria.fr \
--cc=arnd@arndb.de \
--cc=davidcomponentone@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=yang.guang5@zte.com.cn \
/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
all inboxes | Powered by JetHome®