public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Mike Travis <travis@sgi.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [FIX REQUEST] x86: smp.h is totally confused about processor ID
Date: Sat, 11 Jul 2009 13:30:34 +0530	[thread overview]
Message-ID: <1247299234.2678.10.camel@ht.satnam> (raw)


Latest -tip tree shows
http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=blob;f=arch/x86/include/asm/smp.h;h=6a84ed166aec136334a644cc4fbaa676368ae983;hb=HEAD :


27 DECLARE_PER_CPU(int, cpu_number);
28 
29 static inline struct cpumask *cpu_sibling_mask(int cpu)
30 {
31         return per_cpu(cpu_sibling_map, cpu);
32 }
33 
34 static inline struct cpumask *cpu_core_mask(int cpu)
35 {
36         return per_cpu(cpu_core_map, cpu);
37 }

it should be unsigned int cpu/cpu_number as it is non-negative.


47 
48 struct smp_ops {
49         void (*smp_prepare_boot_cpu)(void);
50         void (*smp_prepare_cpus)(unsigned max_cpus);
51         void (*smp_cpus_done)(unsigned max_cpus);
52 
53         void (*smp_send_stop)(void);
54         void (*smp_send_reschedule)(int cpu);
55 
56         int (*cpu_up)(unsigned cpu);
57         int (*cpu_disable)(void);
58         void (*cpu_die)(unsigned int cpu);
59         void (*play_dead)(void);
60 
61         void (*send_call_func_ipi)(const struct cpumask *mask);
62         void (*send_call_func_single_ipi)(int cpu);
63 };

In same structure it using int, unsigned and unsigned int cpu

It should be consistent either unsigned cpu or unsigned int cpu.

I think unsigned int cpu will be more better choice.

Similarly another instances in same file.

Thanks,
--
JSR





             reply	other threads:[~2009-07-11  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11  8:00 Jaswinder Singh Rajput [this message]
2009-07-11 11:06 ` [FIX REQUEST] x86: smp.h is totally confused about processor ID Rusty Russell

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=1247299234.2678.10.camel@ht.satnam \
    --to=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=travis@sgi.com \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox