From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbdFLOOB (ORCPT ); Mon, 12 Jun 2017 10:14:01 -0400 Received: from smtp105.iad3a.emailsrvr.com ([173.203.187.105]:50153 "EHLO smtp105.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751984AbdFLON6 (ORCPT ); Mon, 12 Jun 2017 10:13:58 -0400 X-Auth-ID: siepeng@mev.co.uk X-Sender-Id: siepeng@mev.co.uk Subject: Re: [PATCH v5 1/6] asm-generic/bug.h: declare struct pt_regs; before function prototype To: Steven Rostedt References: <20170525120316.24473-1-abbotti@mev.co.uk> <20170525120316.24473-2-abbotti@mev.co.uk> <20170608100731.43ee0323@gandalf.local.home> Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Alexander Potapenko , Andrew Morton , Arnd Bergmann , Borislav Petkov , Hidehiro Kawai , Jakub Kicinski , Johannes Berg , Kees Cook , Michal Nazarewicz , Peter Zijlstra , Rasmus Villemoes From: Ian Abbott Message-ID: <20489607-25ef-1cbc-3679-6d4c7253514b@mev.co.uk> Date: Mon, 12 Jun 2017 15:13:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170608100731.43ee0323@gandalf.local.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/06/17 15:07, Steven Rostedt wrote: > On Thu, 25 May 2017 13:03:11 +0100 > Ian Abbott wrote: > >> 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. >> > > Not sure if this has been pulled already or not, but I have a small nit. It's already in linux-next master. > >> Signed-off-by: Ian Abbott >> Cc: Arnd Bergmann >> Acked-by: Arnd Bergmann >> Acked-by: Michal Nazarewicz >> --- >> v3: Actually, there was no v1 or v2. I called this v3 to match the >> series. >> v4: Corrected 'Acked-by:' line in patch description. >> v5: Added Acked-by for Michal Nazarewicz. >> --- >> 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; > > Probably be better to move pt_regs above the comment. For one, it is > used before warn_args in the function below. Two, it's not defined > internally by panic.c like warn_args is. Alternatively, the comment could be placed on the same line as `struct warn_args;`. I don't think it's a big enough of a deal to patch it for the sake of it, tbh. > > -- Steve > > >> >> void __warn(const char *file, int line, void *caller, unsigned taint, >> struct pt_regs *regs, struct warn_args *args); > -- -=( Ian Abbott @ MEV Ltd. E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-