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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H5mqDUndoX=mam8S9JKn0nEUHc=NXb7FQJ-0uau=OqoAQ@mail.gmail.com>
Date:   Tue, 18 Aug 2020 20:44:09 +0800
From:   Huacai Chen <chenhc@...ote.com>
To:     Youling Tang <tangyouling@...ngson.cn>
Cc:     Jiaxun Yang <jiaxun.yang@...goat.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        "open list:MIPS" <linux-mips@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] MIPS: Loongson64: Fix build error about redeclaration of
 enumerator 'VIRTUAL' and "CONFIG_DM_THIN_PROVISIONING"

Hi, Youling,

On Tue, Aug 18, 2020 at 7:35 PM Youling Tang <tangyouling@...ngson.cn> wrote:
>
> After commit 39c1485c8baa (MIPS: KVM: Add kvm guestsupport for Loongson-3)
>
> Fix the following build error:
>
> drivers/md/dm-thin.c:116:2: error: redeclaration of enumerator ‘VIRTUAL’
>   VIRTUAL,
>   ^
> In file included from ./arch/mips/include/asm/mach-loongson64/mmzone.h:12:0,
>                  from ./arch/mips/include/asm/mmzone.h:12,
>                  from ./include/linux/mmzone.h:962,
>                  from ./include/linux/gfp.h:6,
>                  from ./include/linux/slab.h:15,
>                  from ./include/linux/genhd.h:16,
>                  from ./include/linux/blkdev.h:8,
>                  from drivers/md/persistent-data/dm-block-manager.h:11,
>                  from drivers/md/dm-thin-metadata.h:10,
>                  from drivers/md/dm-thin.c:7:
> ./arch/mips/include/asm/mach-loongson64/boot_param.h:198:2: note: previous
> definition of ‘VIRTUAL’ was here VIRTUAL = 3
>                                  ^
> scripts/Makefile.build:283: recipe for target 'drivers/md/dm-thin.o' failed
> make[2]: *** [drivers/md/dm-thin.o] Error 1
>
> Signed-off-by: Youling Tang <tangyouling@...ngson.cn>
> ---
>  arch/mips/include/asm/mach-loongson64/boot_param.h | 2 +-
>  arch/mips/loongson64/env.c                         | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
> index afc92b7..a4ef4ac 100644
> --- a/arch/mips/include/asm/mach-loongson64/boot_param.h
> +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
> @@ -195,7 +195,7 @@ struct boot_params {
>  enum loongson_bridge_type {
>         LS7A = 1,
>         RS780E = 2,
> -       VIRTUAL = 3
> +       VIRT = 3
>  };
Thank you for your patch, but I think this problem is because of
invalid .h file inclusion (arch-dependent .h file should not be
included in drivers), and Xuerui Wang has investigated it for some
time. He has a draft patch (haven't sent yet) which I think is a
better way. So, please wait some time.

Huacai
>
>  struct loongson_system_configuration {
> diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c
> index 134cb8e..623b3f1 100644
> --- a/arch/mips/loongson64/env.c
> +++ b/arch/mips/loongson64/env.c
> @@ -180,8 +180,8 @@ void __init prom_init_env(void)
>                 loongson_sysconf.early_config = rs780e_early_config;
>                 break;
>         default:
> -               pr_info("The bridge chip is VIRTUAL\n");
> -               loongson_sysconf.bridgetype = VIRTUAL;
> +               pr_info("The bridge chip is VIRT\n");
> +               loongson_sysconf.bridgetype = VIRT;
>                 loongson_sysconf.early_config = virtual_early_config;
>                 loongson_fdt_blob = __dtb_loongson64v_4core_virtio_begin;
>                 break;
> --
> 2.1.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ