From: Sam Ravnborg <sam@ravnborg.org>
To: Conor.Dooley@microchip.com
Cc: mail@conchuod.ie, monstr@monstr.eu, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu, hca@linux.ibm.com,
gor@linux.ibm.com, agordeev@linux.ibm.com,
borntraeger@linux.ibm.com, svens@linux.ibm.com,
ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
arnd@arndb.de, geert@linux-m68k.org, keescook@chromium.org,
peterz@infradead.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 5/6] sparc: use the asm-generic version of cpuinfo_op
Date: Fri, 26 Aug 2022 19:41:16 +0200 [thread overview]
Message-ID: <YwkFvFiTdCccdSV8@ravnborg.org> (raw)
In-Reply-To: <87c83d38-18bc-7dfc-be6f-d906ed713450@microchip.com>
On Fri, Aug 26, 2022 at 03:37:40PM +0000, Conor.Dooley@microchip.com wrote:
> On 26/08/2022 15:47, Sam Ravnborg wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > 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@microchip.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@microchip.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.
>
> Hey Sam, thanks for your feedback.
> As per Geert's suggestion, submitted a v2:
> https://lore.kernel.org/linux-riscv/20220825205942.1713914-1-mail@conchuod.ie/T/#u
>
> In v2, I included linux/processor.h instead of an asm-generic header.
> The diff for sparc became:
>
> diff --git a/arch/sparc/include/asm/cpudata.h b/arch/sparc/include/asm/cpudata.h
> index d213165ee713..f7e690a7860b 100644
> --- a/arch/sparc/include/asm/cpudata.h
> +++ b/arch/sparc/include/asm/cpudata.h
> @@ -7,8 +7,6 @@
> #include <linux/threads.h>
> #include <linux/percpu.h>
>
> -extern const struct seq_operations cpuinfo_op;
> -
> #endif /* !(__ASSEMBLY__) */
>
> #if defined(__sparc__) && defined(__arch64__)
> diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
> index 79cd6ccfeac0..ffdc7a825b80 100644
> --- a/arch/sparc/kernel/cpu.c
> +++ b/arch/sparc/kernel/cpu.c
> @@ -12,6 +12,7 @@
> #include <linux/smp.h>
> #include <linux/threads.h>
> #include <linux/pgtable.h>
> +#include <linux/processor.h>
>
> #include <asm/spitfire.h>
> #include <asm/oplib.h>
>
> Hopefully that is more appealing to you!
> Thanks,
> Conor.
Hi Conor - much better. Thanks.
Sam
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Conor.Dooley@microchip.com
Cc: mail@conchuod.ie, monstr@monstr.eu, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu, hca@linux.ibm.com,
gor@linux.ibm.com, agordeev@linux.ibm.com,
borntraeger@linux.ibm.com, svens@linux.ibm.com,
ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
arnd@arndb.de, geert@linux-m68k.org, keescook@chromium.org,
peterz@infradead.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 5/6] sparc: use the asm-generic version of cpuinfo_op
Date: Fri, 26 Aug 2022 19:41:16 +0200 [thread overview]
Message-ID: <YwkFvFiTdCccdSV8@ravnborg.org> (raw)
In-Reply-To: <87c83d38-18bc-7dfc-be6f-d906ed713450@microchip.com>
On Fri, Aug 26, 2022 at 03:37:40PM +0000, Conor.Dooley@microchip.com wrote:
> On 26/08/2022 15:47, Sam Ravnborg wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > 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@microchip.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@microchip.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.
>
> Hey Sam, thanks for your feedback.
> As per Geert's suggestion, submitted a v2:
> https://lore.kernel.org/linux-riscv/20220825205942.1713914-1-mail@conchuod.ie/T/#u
>
> In v2, I included linux/processor.h instead of an asm-generic header.
> The diff for sparc became:
>
> diff --git a/arch/sparc/include/asm/cpudata.h b/arch/sparc/include/asm/cpudata.h
> index d213165ee713..f7e690a7860b 100644
> --- a/arch/sparc/include/asm/cpudata.h
> +++ b/arch/sparc/include/asm/cpudata.h
> @@ -7,8 +7,6 @@
> #include <linux/threads.h>
> #include <linux/percpu.h>
>
> -extern const struct seq_operations cpuinfo_op;
> -
> #endif /* !(__ASSEMBLY__) */
>
> #if defined(__sparc__) && defined(__arch64__)
> diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
> index 79cd6ccfeac0..ffdc7a825b80 100644
> --- a/arch/sparc/kernel/cpu.c
> +++ b/arch/sparc/kernel/cpu.c
> @@ -12,6 +12,7 @@
> #include <linux/smp.h>
> #include <linux/threads.h>
> #include <linux/pgtable.h>
> +#include <linux/processor.h>
>
> #include <asm/spitfire.h>
> #include <asm/oplib.h>
>
> Hopefully that is more appealing to you!
> Thanks,
> Conor.
Hi Conor - much better. Thanks.
Sam
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-08-26 17:41 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 11:35 [PATCH 0/6] Add an asm-generic cpuinfo_op declaration Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-21 11:35 ` [PATCH 1/6] asm-generic: add a cpuinfo_ops definition in shared code Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-21 11:44 ` Conor.Dooley
2022-08-21 11:44 ` Conor.Dooley
2022-08-21 11:35 ` [PATCH 2/6] microblaze: use the asm-generic version of cpuinfo_op Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-21 11:35 ` [PATCH 3/6] s390: " Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-21 11:35 ` [PATCH 4/6] sh: " Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-21 11:35 ` [PATCH 5/6] sparc: " Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-26 14:47 ` Sam Ravnborg
2022-08-26 14:47 ` Sam Ravnborg
2022-08-26 15:37 ` Conor.Dooley
2022-08-26 15:37 ` Conor.Dooley
2022-08-26 17:41 ` Sam Ravnborg [this message]
2022-08-26 17:41 ` Sam Ravnborg
2022-08-21 11:35 ` [PATCH 6/6] x86: " Conor Dooley
2022-08-21 11:35 ` Conor Dooley
2022-08-22 9:36 ` [PATCH 0/6] Add an asm-generic cpuinfo_op declaration Geert Uytterhoeven
2022-08-22 9:36 ` Geert Uytterhoeven
2022-08-22 10:05 ` Conor.Dooley
2022-08-22 10:05 ` Conor.Dooley
2022-08-22 10:45 ` Geert Uytterhoeven
2022-08-22 10:45 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YwkFvFiTdCccdSV8@ravnborg.org \
--to=sam@ravnborg.org \
--cc=Conor.Dooley@microchip.com \
--cc=agordeev@linux.ibm.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=dalias@libc.org \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=geert@linux-m68k.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=mail@conchuod.ie \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=sparclinux@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.