public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: smpboot: mark array as const
@ 2011-06-30 22:31 Greg Dietsche
  2011-07-01  0:23 ` H. Peter Anvin
  2011-07-01  1:13 ` Greg Dietsche
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Dietsche @ 2011-06-30 22:31 UTC (permalink / raw)
  To: kernel-janitors

This array is read-only. Make it explicit by marking as const.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 9fd3137..4218569 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -438,7 +438,7 @@ static void impress_friends(void)
 void __inquire_remote_apic(int apicid)
 {
 	unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
-	char *names[] = { "ID", "VERSION", "SPIV" };
+	const char const *names[] = { "ID", "VERSION", "SPIV" };
 	int timeout;
 	u32 status;
 
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: smpboot: mark array as const
  2011-06-30 22:31 [PATCH] x86: smpboot: mark array as const Greg Dietsche
@ 2011-07-01  0:23 ` H. Peter Anvin
  2011-07-01  1:13 ` Greg Dietsche
  1 sibling, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2011-07-01  0:23 UTC (permalink / raw)
  To: kernel-janitors

On 06/30/2011 03:31 PM, Greg Dietsche wrote:
> This array is read-only. Make it explicit by marking as const.
> 
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
> ---
>  arch/x86/kernel/smpboot.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 9fd3137..4218569 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -438,7 +438,7 @@ static void impress_friends(void)
>  void __inquire_remote_apic(int apicid)
>  {
>  	unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
> -	char *names[] = { "ID", "VERSION", "SPIV" };
> +	const char const *names[] = { "ID", "VERSION", "SPIV" };
>  	int timeout;

Did you mean "const char * const" here?

	-hpa

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: smpboot: mark array as const
  2011-06-30 22:31 [PATCH] x86: smpboot: mark array as const Greg Dietsche
  2011-07-01  0:23 ` H. Peter Anvin
@ 2011-07-01  1:13 ` Greg Dietsche
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Dietsche @ 2011-07-01  1:13 UTC (permalink / raw)
  To: kernel-janitors

On Thu, Jun 30, 2011 at 05:23:03PM -0700, H. Peter Anvin wrote:
> On 06/30/2011 03:31 PM, Greg Dietsche wrote:
> > This array is read-only. Make it explicit by marking as const.
> > 
> > Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
> > ---
> >  arch/x86/kernel/smpboot.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> > index 9fd3137..4218569 100644
> > --- a/arch/x86/kernel/smpboot.c
> > +++ b/arch/x86/kernel/smpboot.c
> > @@ -438,7 +438,7 @@ static void impress_friends(void)
> >  void __inquire_remote_apic(int apicid)
> >  {
> >  	unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
> > -	char *names[] = { "ID", "VERSION", "SPIV" };
> > +	const char const *names[] = { "ID", "VERSION", "SPIV" };
> >  	int timeout;
> 
> Did you mean "const char * const" here?
doh! Yes, i did! Sorry I missed this email the first time around - my
procmail rules need a little work....

Greg

> 	-hpa
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-01  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-30 22:31 [PATCH] x86: smpboot: mark array as const Greg Dietsche
2011-07-01  0:23 ` H. Peter Anvin
2011-07-01  1:13 ` Greg Dietsche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox