From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Andy Shevchenko <andy.shevchenko@gmail.com>, davidcomponentone@gmail.com
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
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: Mon, 8 Nov 2021 10:16:25 +0100 [thread overview]
Message-ID: <1fb9ff6d-e129-5109-7431-c9da67d04d1f@xs4all.nl> (raw)
In-Reply-To: <CAHp75VdZLdJS2SLijO+Ff-8OM+fBvS-R1er5ByYuw38qrRXRwA@mail.gmail.com>
On 04/11/2021 11:43, Andy Shevchenko wrote:
> 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?
>
checkpatch says all is fine :-)
But yes, the {} can now be dropped. If I apply the patch, then run checkpatch,
it will indeed complain about the {}.
Regards,
Hans
prev parent reply other threads:[~2021-11-08 9:16 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
2021-11-08 9:16 ` Hans Verkuil [this message]
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=1fb9ff6d-e129-5109-7431-c9da67d04d1f@xs4all.nl \
--to=hverkuil-cisco@xs4all.nl \
--cc=Julia.Lawall@inria.fr \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=davidcomponentone@gmail.com \
--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®