Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp232498pxa; Tue, 18 Aug 2020 22:49:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM9GH2QeK2MXjLRSn4Bn78Dtk1wmKpjrUZext7pttN/0KsBsgohCtxA8ff+OSDZX0VmXdz X-Received: by 2002:a50:fc8d:: with SMTP id f13mr23773720edq.380.1597816161028; Tue, 18 Aug 2020 22:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597816161; cv=none; d=google.com; s=arc-20160816; b=Z2Tfqv738bjDDARdqwTsMVTshyIU3UKXQYaJfc5ueKSTeLabjIUtQFPUFoinIOhisE +7KQppx0CiAwIB5cVe6buZAGalrSptIg+XYAG1srU5m0Y6dS/hYzS36PiA+u6Akcq7ao wYUB3QGM5k2sgd/7kuWAP0tnjeyzfbw0dZesmbFy+wMr98ooFImi7YcCKJ0UU/ebyxJv z+Cn9VJmBF7E33yieTnOhEqjGVJGpUdCvLJM2lNbrg7IqoV+5XFYVZrgdovbgHRghtOq 62eesxeEQG/9Ht7booSm9RPI1jxMoCIbLh0n7DGn4sb3ZEiDS+eq6l1Q5OHkieCS9SOx kVjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gjgL3mmfuN4YOg+Nrk1m/NohEQ6P2EJjsCLB+UH1kws=; b=ijyNjJSL+0MtcoNpVr9DSNaiBeJHM9ZYmYSL9mNCv18hHGKbHF6qJ/GhU3T5jlKZ+o Ip3NN3Q0h+7PCXX2rraXie45FdIc3VYBsvpGUEQg2Y/ruUJcTicGY5yA1EgZRbQmzmpn k0XXeF/HGGc5yQ+qeLJauv/EWrV56z9fIB6ydINA0fhMApRGaHBQldMDTnbXuQqn2Do3 +SKtzqQcuITyL+pEVI2vZwZY3wNYMDLTV9Pkq1qKSJPQHVxYb3Bc8EEml9dcHMIf1ZvP /PDkhIVOTmXBu7I0vHzM8r6vTvBfN/3cSZ1tM6ircD2LrCGZ4A0z+0h9Ttlm0L+WkhXn y7PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@xen0n.name header.s=mail header.b=tPi4mYXH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj25si15133020edb.175.2020.08.18.22.48.57; Tue, 18 Aug 2020 22:49:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@xen0n.name header.s=mail header.b=tPi4mYXH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726408AbgHSFsM (ORCPT + 99 others); Wed, 19 Aug 2020 01:48:12 -0400 Received: from [115.28.160.31] ([115.28.160.31]:58282 "EHLO mailbox.box.xen0n.name" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1725883AbgHSFsK (ORCPT ); Wed, 19 Aug 2020 01:48:10 -0400 Received: from hanazono.local (unknown [140.206.66.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 203536009E; Wed, 19 Aug 2020 13:47:48 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=xen0n.name; s=mail; t=1597816068; bh=KRrHwfUQuKjAb85/oLK3ZUF0M9g04e+91BLM9g/wlMs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=tPi4mYXHmiuOAuKaFwBNtsdr5U02fwW3w1htFvAszZB68OljMlR04sbip5fMIv8Y7 jFdHvcKj2WihUyCSoBgtKpkd3ZtUUiQo3oCzFhkMguYlK0DbUm9Pp2qDBu/73tj3CS ny1O4WJ1Y0YIWB+2yg1eJ/1IdVhNMBaf++j8c+yQ= Subject: Re: [PATCH] MIPS: Loongson64: Fix build error about redeclaration of enumerator 'VIRTUAL' and "CONFIG_DM_THIN_PROVISIONING" To: Youling Tang , Huacai Chen , Jiaxun Yang , Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org References: <1597750368-14086-1-git-send-email-tangyouling@loongson.cn> From: WANG Xuerui Message-ID: Date: Wed, 19 Aug 2020 13:47:47 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:81.0) Gecko/20100101 Thunderbird/81.0a1 MIME-Version: 1.0 In-Reply-To: <1597750368-14086-1-git-send-email-tangyouling@loongson.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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;