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-next>] [day] [month] [year] [list]
Message-Id: <1597750368-14086-1-git-send-email-tangyouling@loongson.cn>
Date:   Tue, 18 Aug 2020 19:32:48 +0800
From:   Youling Tang <tangyouling@...ngson.cn>
To:     Huacai Chen <chenhc@...ote.com>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] MIPS: Loongson64: Fix build error about redeclaration of enumerator 'VIRTUAL' and "CONFIG_DM_THIN_PROVISIONING"

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
 };
 
 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