All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] signedness of cpu variables
Date: Thu, 08 Feb 2007 11:11:12 +0000	[thread overview]
Message-ID: <45CB0550.8090302@bfs.de> (raw)
In-Reply-To: <8ef77f2e0702061132lf8e4a2cj7ae612976029e21b@mail.gmail.com>



Randy Dunlap wrote:
> On Wed, 07 Feb 2007 11:41:19 +0100 walter harms wrote:
> 
>> if this is intended, someone could add a remark about it ?
>>
> 
> If what is intended?  and please use reply-to-all.


ups wrong button :)

my point is:
if there is a reason to have a signed int cpu variable (instead
the 'normal' unsigned int) it should be documented WHY this is an
exception.

re,
 walter



> 
>> Randy Dunlap wrote:
>>> On Tue, 6 Feb 2007 20:32:29 +0100 Thomas Hisch wrote:
>>>
>>>> i digged into the kernel source and found a lot of signed int cpu variables.
>>>> shouldn't they be replaced by unsigned ints ??
>>>>
>>>> for example everywhere in kernel/cpu.c cpu variables are unsigned except in
>>>> check_for_tasks(int cpu). are there any reasons for the signed int parameter
>>>> of this  particular function ??
>>>>
>>>> any thoughts ??
>>>> is this sth. for the kernel-janitors ?
>>> This one makes sense.  Others would need their own evaluations.
>>>
>>>> regards
>>>> Thomas Hisch
>>>>
>>>> diff --git a/kernel/cpu.c b/kernel/cpu.c
>>>> index 7406fe6..b0d4fbd 100644
>>>> --- a/kernel/cpu.c
>>>> +++ b/kernel/cpu.c
>>>> @@ -87,7 +87,7 @@ void unregister_cpu_notifier(struct notifier_block *nb)
>>>>  }
>>>>  EXPORT_SYMBOL(unregister_cpu_notifier);
>>>>
>>>> -static inline void check_for_tasks(int cpu)
>>>> +static inline void check_for_tasks(unsigned int cpu)
>>>>  {
>>>>         struct task_struct *p;
>>>
>>> ---
> 
> ---
> ~Randy
> 
> 
> 
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

      parent reply	other threads:[~2007-02-08 11:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 19:32 [KJ] signedness of cpu variables Thomas Hisch
2007-02-06 22:25 ` Randy Dunlap
2007-02-07 10:41 ` walter harms
2007-02-07 14:07 ` Thomas Hisch
2007-02-07 14:16 ` Thomas Hisch
2007-02-07 16:09 ` Randy Dunlap
2007-02-07 16:53 ` Randy Dunlap
2007-02-08  6:19 ` Alexey Dobriyan
2007-02-08 11:11 ` walter harms [this message]

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=45CB0550.8090302@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@vger.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 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.