From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Abbott Subject: [PATCH v4 1/2] asm-generic/bug.h: declare struct pt_regs; before function prototype Date: Tue, 23 May 2017 17:01:11 +0100 Message-ID: <20170523160112.3446-2-abbotti@mev.co.uk> References: <20170523160112.3446-1-abbotti@mev.co.uk> Return-path: In-Reply-To: <20170523160112.3446-1-abbotti@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Arnd Bergmann , Andrew Morton , Michal Nazarewicz , Hidehiro Kawai , Borislav Petkov , Rasmus Villemoes , Johannes Berg , Peter Zijlstra , Alexander Potapenko , Ian Abbott List-Id: linux-arch.vger.kernel.org The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Acked-by: Arnd Bergmann --- v3: Actually, there was no v1 or v2. I called this v3 to match the series. v4: Corrected 'Acked-by:' line in patch description. --- include/asm-generic/bug.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index d6f4aed479a1..87191357d303 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -97,6 +97,7 @@ extern void warn_slowpath_null(const char *file, const int line); /* used internally by panic.c */ struct warn_args; +struct pt_regs; void __warn(const char *file, int line, void *caller, unsigned taint, struct pt_regs *regs, struct warn_args *args); -- 2.11.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp64.iad3a.emailsrvr.com ([173.203.187.64]:57968 "EHLO smtp64.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763667AbdEWQBY (ORCPT ); Tue, 23 May 2017 12:01:24 -0400 From: Ian Abbott Subject: [PATCH v4 1/2] asm-generic/bug.h: declare struct pt_regs; before function prototype Date: Tue, 23 May 2017 17:01:11 +0100 Message-ID: <20170523160112.3446-2-abbotti@mev.co.uk> In-Reply-To: <20170523160112.3446-1-abbotti@mev.co.uk> References: <20170523160112.3446-1-abbotti@mev.co.uk> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Arnd Bergmann , Andrew Morton , Michal Nazarewicz , Hidehiro Kawai , Borislav Petkov , Rasmus Villemoes , Johannes Berg , Peter Zijlstra , Alexander Potapenko , Ian Abbott Message-ID: <20170523160111.Ya7F0T62lLjBi8C6Zy8QgbO4hq2yGw6mA07y1RHl2u4@z> The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Acked-by: Arnd Bergmann --- v3: Actually, there was no v1 or v2. I called this v3 to match the series. v4: Corrected 'Acked-by:' line in patch description. --- include/asm-generic/bug.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index d6f4aed479a1..87191357d303 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -97,6 +97,7 @@ extern void warn_slowpath_null(const char *file, const int line); /* used internally by panic.c */ struct warn_args; +struct pt_regs; void __warn(const char *file, int line, void *caller, unsigned taint, struct pt_regs *regs, struct warn_args *args); -- 2.11.0