From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752870AbcFFOO7 (ORCPT ); Mon, 6 Jun 2016 10:14:59 -0400 Received: from www.linutronix.de ([62.245.132.108]:33561 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbcFFOO4 (ORCPT ); Mon, 6 Jun 2016 10:14:56 -0400 Date: Mon, 6 Jun 2016 16:12:55 +0200 (CEST) From: Thomas Gleixner To: Arnd Bergmann cc: Alexandre Belloni , linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: Re: [PATCH] x86: include linux/ratelimit.h in nmi.c In-Reply-To: <1465222212-2579966-1-git-send-email-arnd@arndb.de> Message-ID: References: <1465222212-2579966-1-git-send-email-arnd@arndb.de> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 6 Jun 2016, Arnd Bergmann wrote: > When building random configurations, we now occasionally get a new > build error: > > In file included from include/linux/kernel.h:13:0, > from include/linux/list.h:8, > from include/linux/preempt.h:10, > from include/linux/spinlock.h:50, > from arch/x86/kernel/nmi.c:13: > arch/x86/kernel/nmi.c: In function 'nmi_max_handler': > include/linux/printk.h:375:9: error: type defaults to 'int' in declaration of 'DEFINE_RATELIMIT_STATE' [-Werror=implicit-int] > static DEFINE_RATELIMIT_STATE(_rs, \ > ^ > arch/x86/kernel/nmi.c:110:2: note: in expansion of macro 'printk_ratelimited' > printk_ratelimited(KERN_INFO > ^~~~~~~~~~~~~~~~~~ > > This was working before the rtc rework series because linux/ratelimit.h > was included implictly through asm/mach_traps.h -> asm/mc146818rtc.h > -> linux/mc146818rtc.h -> linux/rtc.h -> linux/device.h. > > We clearly shouldn't rely on this indirect inclusion, so this adds > an explicit #include in the file that needs it. > > Signed-off-by: Arnd Bergmann > Reported-by: kbuild test robot > Fixes: 5ab788d73832 ("rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h") > --- > It's only broken in the linux-rtc git at the moment, so it makes sense > to fix it there. Acked-by: Thomas Gleixner