lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1fb9ff6d-e129-5109-7431-c9da67d04d1f@xs4all.nl>
Date:   Mon, 8 Nov 2021 10:16:25 +0100
From:   Hans Verkuil <hverkuil-cisco@...all.nl>
To:     Andy Shevchenko <andy.shevchenko@...il.com>,
        davidcomponentone@...il.com
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Julia Lawall <Julia.Lawall@...ia.fr>,
        Yang Guang <yang.guang5@....com.cn>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: use swap() to make code cleaner

On 04/11/2021 11:43, Andy Shevchenko wrote:
> On Wed, Nov 3, 2021 at 10:34 AM <davidcomponentone@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ