[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <059030d7-657a-6403-ae75-3314f790afa3@linuxfoundation.org>
Date: Thu, 7 Apr 2022 12:45:31 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Guo Zhengkui <guozhengkui@...o.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>,
"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Cc: zhengkui_guo@...look.com, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] userfaultfd/selftests: use swap() instead of open coding
it
On 4/7/22 6:31 AM, Guo Zhengkui wrote:
> Address the following coccicheck warning:
>
> tools/testing/selftests/vm/userfaultfd.c:1536:21-22: WARNING opportunity
> for swap().
> tools/testing/selftests/vm/userfaultfd.c:1540:33-34: WARNING opportunity
> for swap().
>
> by using swap() for the swapping of variable values and drop
> `tmp_area` that is not needed any more.
>
> `swap()` macro in userfaultfd.c is introduced in commit 681696862bc18
> ("selftests: vm: remove dependecy from internal kernel macros")
>
> It has been tested with gcc (Debian 8.3.0-6) 8.3.0.
>
> Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
Looks good.
Reviewed-by: Shuah Khan <skhan@...uxfoundation.org>
thanks,
-- Shuah
Powered by blists - more mailing lists