Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp305760ybi; Thu, 1 Aug 2019 19:29:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMtORMbSzFhpM31IVmWx4V67b3mEQMMufPoJ6L44qlUXUwSOOoLLudpaGLksLML9sUKVxj X-Received: by 2002:a63:c748:: with SMTP id v8mr91029729pgg.418.1564712997259; Thu, 01 Aug 2019 19:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564712997; cv=none; d=google.com; s=arc-20160816; b=eiMiMOAdqS3WohEcxzd8sQAHX/0FdQwpsDPQfaK0W5YKt3CYn9HfFTHI8iYOFUzxHA rohrXDLz44r+AePoFRud6fjyuQkRC+dphXwQOm0CdsgwNt9EXSvOZeZjFAvixDuEuFEB Js76R/6H5kVBZace87O/d/P0ijS+LK52JRuVCdBSdnq4N7PP40hwHdGH6FiuqAn8KNK2 9ajjC/QIk93sNkOMsBCsjEPROBECh6twMuSVdnIqiLbPRPX54mnuixkQbOJ+ioO6akzW u0Lvaan0Mn7CH/PIWFuIG7E25lIovy4Gt/qnJUzostyr3wVtRxjh6znsIxcrqM6etwAi QETg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:message-id:cc:to; bh=VQGmxFoAXdfRCnJuK8Q6RZlW3Zn0aZQ6pEy8N/EhcdQ=; b=aEUQzxIpdH+mMp40gsugtuyWPkw3QGkI9A1zY04tWKjTHKI4IywP11xiUiBHjxGz/e b8MAlk1TnfP5qDhRS52pyqR2Oe5tn6wjWv7t/O9S2GaG4wQ5Y6IbIKNeqV1m4dsLzydM fWaN9J+ycSpFBWJ0qgaIX5/p3b3dJ+/VLZSnhvKoWRqgGEzy0Ee/sVjQgoVHXBlyEnWF Cj3izfBMEofzE7j2C2K7DAtSrh+zRbMYQtq2YRja6IDClFwX7/wDcclrmmdWljDM3GKp AjACSCIG5irJAQFy0J13+Vd7iRX2LW55AaUqtQJrg1TZkJJRXIddvHRq0lZEGweOOkVZ n2mA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e30si37450015pfm.78.2019.08.01.19.29.42; Thu, 01 Aug 2019 19:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388280AbfHBA2b (ORCPT + 99 others); Thu, 1 Aug 2019 20:28:31 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:57172 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbfHBA2b (ORCPT ); Thu, 1 Aug 2019 20:28:31 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 4C16129C8C; Thu, 1 Aug 2019 20:28:30 -0400 (EDT) To: Geert Uytterhoeven Cc: "Michael Schmitz" , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Message-Id: <9ec2190f5be1c4e676a803901200364578662b6d.1564704625.git.fthain@telegraphics.com.au> From: Finn Thain Subject: [PATCH] m68k: Prevent some compiler warnings in coldfire builds Date: Fri, 02 Aug 2019 10:10:25 +1000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit d3b41b6bb49e ("m68k: Dispatch nvram_ops calls to Atari or Mac functions"), Coldfire builds generate compiler warnings due to the unconditional inclusion of asm/atarihw.h and asm/macintosh.h. The inclusion of asm/atarihw.h causes warnings like this: In file included from ./arch/m68k/include/asm/atarihw.h:25:0, from arch/m68k/kernel/setup_mm.c:41, from arch/m68k/kernel/setup.c:3: ./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined #define __raw_readb in_8 In file included from ./arch/m68k/include/asm/io.h:6:0, from arch/m68k/kernel/setup_mm.c:36, from arch/m68k/kernel/setup.c:3: ./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the previous definition #define __raw_readb(addr) \ ... This issue is resolved by dropping the asm/raw_io.h include. It turns out that asm/io_mm.h already includes that header file. Moving the relevant macro definitions helps to clarify this dependency and make it safe to include asm/atarihw.h. The other warnings look like this: In file included from arch/m68k/kernel/setup_mm.c:48:0, from arch/m68k/kernel/setup.c:3: ./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' declared inside parameter list will not be visible outside of this definition or declaration extern void mac_irq_enable(struct irq_data *data); ^~~~~~~~ ... This issue is resolved by adding the missing linux/irq.h include. Cc: Michael Schmitz Signed-off-by: Finn Thain --- arch/m68k/include/asm/atarihw.h | 9 --------- arch/m68k/include/asm/io_mm.h | 6 +++++- arch/m68k/include/asm/macintosh.h | 1 + 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index 533008262b69..5e5601c382b8 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h @@ -22,7 +22,6 @@ #include #include -#include #include extern u_long atari_mch_cookie; @@ -132,14 +131,6 @@ extern struct atari_hw_present atari_hw_present; */ -#define atari_readb raw_inb -#define atari_writeb raw_outb - -#define atari_inb_p raw_inb -#define atari_outb_p raw_outb - - - #include #include diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h index 6c03ca5bc436..819f611dccf2 100644 --- a/arch/m68k/include/asm/io_mm.h +++ b/arch/m68k/include/asm/io_mm.h @@ -29,7 +29,11 @@ #include #ifdef CONFIG_ATARI -#include +#define atari_readb raw_inb +#define atari_writeb raw_outb + +#define atari_inb_p raw_inb +#define atari_outb_p raw_outb #endif diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index 8f0698bca3dc..8a43babcf53a 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h @@ -4,6 +4,7 @@ #include #include +#include #include -- 2.21.0