From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754320AbcKIUpP (ORCPT ); Wed, 9 Nov 2016 15:45:15 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35747 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbcKIUpO (ORCPT ); Wed, 9 Nov 2016 15:45:14 -0500 From: Sudip Mukherjee To: Ralf Baechle , Paul Burton Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, james.hogan@imgtec.com, Sudip Mukherjee Subject: [PATCH v2] MIPS: fix duplicate define Date: Wed, 9 Nov 2016 20:44:54 +0000 Message-Id: <1478724294-15736-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mips build of ip27_defconfig is failing with the error: In file included from ../arch/mips/include/asm/mach-ip27/spaces.h:29:0, from ../arch/mips/include/asm/page.h:12, from ../arch/mips/vdso/vdso.h:26, from ../arch/mips/vdso/gettimeofday.c:11: ../arch/mips/include/asm/mach-generic/spaces.h:28:0: error: "CAC_BASE" redefined [-Werror] #define CAC_BASE _AC(0x80000000, UL) In file included from ../arch/mips/include/asm/page.h:12:0, from ../arch/mips/vdso/vdso.h:26, from ../arch/mips/vdso/gettimeofday.c:11: ../arch/mips/include/asm/mach-ip27/spaces.h:22:0: note: this is the location of the previous definition #define CAC_BASE 0xa800000000000000 Add a condition to check if CAC_BASE is already defined, and define it only if it is not yet defined. Fixes: 3ffc17d8768b ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0") Signed-off-by: Sudip Mukherjee --- v2: corrected a silly mistake of overlooking #else Build log is at: https://travis-ci.org/sudipm-mukherjee/parport/jobs/174134289 arch/mips/include/asm/mach-generic/spaces.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h index 952b0fd..3d6d3b0 100644 --- a/arch/mips/include/asm/mach-generic/spaces.h +++ b/arch/mips/include/asm/mach-generic/spaces.h @@ -22,11 +22,13 @@ #endif #ifdef CONFIG_32BIT +#ifndef CAC_BASE #ifdef CONFIG_KVM_GUEST #define CAC_BASE _AC(0x40000000, UL) #else #define CAC_BASE _AC(0x80000000, UL) #endif +#endif #ifndef IO_BASE #define IO_BASE _AC(0xa0000000, UL) #endif -- 1.9.1