From: WANG Xuerui <kernel@xen0n.name>
To: Youling Tang <tangyouling@loongson.cn>,
Huacai Chen <chenhc@lemote.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: Loongson64: Fix build error about redeclaration of enumerator 'VIRTUAL' and "CONFIG_DM_THIN_PROVISIONING"
Date: Wed, 19 Aug 2020 13:47:47 +0800 [thread overview]
Message-ID: <a3a3dfc1-1148-e6db-9ea3-2405c3fe5329@xen0n.name> (raw)
In-Reply-To: <1597750368-14086-1-git-send-email-tangyouling@loongson.cn>
Hi Youling,
On 2020/8/18 19:32, Youling Tang 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@loongson.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
I believe this is only masking the root cause, which is redundant
#include directives inside mach-specific headers. I'll send my version
of fix shortly.
Anyway, thanks for your help!
> };
>
> 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;
prev parent reply other threads:[~2020-08-19 5:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 11:32 [PATCH] MIPS: Loongson64: Fix build error about redeclaration of enumerator 'VIRTUAL' and "CONFIG_DM_THIN_PROVISIONING" Youling Tang
2020-08-18 12:44 ` Huacai Chen
2020-08-19 5:47 ` WANG Xuerui [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3a3dfc1-1148-e6db-9ea3-2405c3fe5329@xen0n.name \
--to=kernel@xen0n.name \
--cc=chenhc@lemote.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tangyouling@loongson.cn \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).