[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ywjc67hcBwOkMtI/@ravnborg.org>
Date: Fri, 26 Aug 2022 16:47:07 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Conor Dooley <mail@...chuod.ie>
Cc: Michal Simek <monstr@...str.eu>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
"David S . Miller" <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Conor Dooley <conor.dooley@...rochip.com>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
sparclinux@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 5/6] sparc: use the asm-generic version of cpuinfo_op
Hi Conor.
Thanks for this nice simplification, but I think you can make it even
better.
On Sun, Aug 21, 2022 at 12:35:12PM +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@...rochip.com>
>
> There's little point in duplicating the declaration of cpuinfo_op now
> that there's a shared version of it, so drop it & include the generic
> header.
>
> Signed-off-by: Conor Dooley <conor.dooley@...rochip.com>
> ---
> arch/sparc/include/asm/cpudata.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/sparc/include/asm/cpudata.h b/arch/sparc/include/asm/cpudata.h
> index d213165ee713..af6ef3c028a9 100644
> --- a/arch/sparc/include/asm/cpudata.h
> +++ b/arch/sparc/include/asm/cpudata.h
> @@ -6,8 +6,7 @@
>
> #include <linux/threads.h>
> #include <linux/percpu.h>
> -
> -extern const struct seq_operations cpuinfo_op;
> +#include <asm-generic/processor.h>
Since the header file did not need <asm-generic/processor.h> then it
should not need it now after deleting stuff.
The better fix is to add the missing include to arch/sparc/kernel/cpu.c,
where we have the user of it.
A header file should include what it needs, and no more.
I looked only at this patch, this comment may also be relevant for the
other patches.
Sam
Powered by blists - more mailing lists