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: <b49ad227-f849-bea9-5f8d-fc76d130f7fd@kernel.org>
Date:   Tue, 28 Dec 2021 19:52:10 -0800
From:   Vineet Gupta <vgupta@...nel.org>
To:     cgel.zte@...il.com, vgupta@...nel.org
Cc:     ye.guojin@....com.cn, yangdianqing@...ong.com, wjc@...rlc.com,
        linux-snps-arc@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] ARC: dw2 unwind: use swap() to make code cleaner

On 11/9/21 9:56 PM, cgel.zte@...il.com wrote:
> From: Ye Guojin <ye.guojin@....com.cn>
> 
> This was found by coccicheck:
> ./arch/arc/kernel/unwind.c, 251, 22-23, WARNING opportunity for swap()
> ./arch/arc/kernel/unwind.c, 254, 18-19, WARNING opportunity for swap()
> 
> Addtionally, adjust the sequence of header files to be arranged in
> alphabetical order.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Ye Guojin <ye.guojin@....com.cn>
> ---
>   arch/arc/kernel/unwind.c | 26 +++++++++++---------------
>   1 file changed, 11 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
> index 9e28058cdba8..ea795304982a 100644
> --- a/arch/arc/kernel/unwind.c
> +++ b/arch/arc/kernel/unwind.c
> @@ -10,17 +10,18 @@
>    * is not much point in implementing the full Dwarf2 unwind API.
>    */
>   
> -#include <linux/sched.h>
> -#include <linux/module.h>
> +#include <asm/sections.h>
> +#include <asm/unaligned.h>
> +#include <asm/unwind.h>

No this is not correct. We always include linux/* first followed by any 
specific arch asm/* includes.

>   #include <linux/memblock.h>
> -#include <linux/sort.h>
> +#include <linux/minmax.h>
> +#include <linux/module.h>
> +#include <linux/ptrace.h>
> +#include <linux/sched.h>
>   #include <linux/slab.h>
> +#include <linux/sort.h>
>   #include <linux/stop_machine.h>
>   #include <linux/uaccess.h>
> -#include <linux/ptrace.h>
> -#include <asm/sections.h>
> -#include <asm/unaligned.h>
> -#include <asm/unwind.h>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ