mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Hidetoshi Seto" <seto.hidetoshi@jp.fujitsu.com>,
	"Paul Jackson" <pj@sgi.com>, "Ingo Molnar" <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix cpuset sched_relax_domain_level control file
Date: Tue, 6 May 2008 18:41:39 -0700	[thread overview]
Message-ID: <6599ad830805061841n57232824s451c4e8788b7864d@mail.gmail.com> (raw)
In-Reply-To: <20080506183841.e1771032.akpm@linux-foundation.org>

On Tue, May 6, 2008 at 6:38 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 06 May 2008 18:08:17 -0700 Paul Menage <menage@google.com> wrote:
>
>  > -static int update_relax_domain_level(struct cpuset *cs, char *buf)
>  > +static int update_relax_domain_level(struct cpuset *cs, s64 val)
>  >  {
>  > -     int val = simple_strtol(buf, NULL, 10);
>  > -
>  > -     if (val < 0)
>  > +     if ((int)val < 0)
>  >               val = -1;
>  >
>
>  Are you sure about the typecast here?  If `val' has a value of say
>  0x0000_ffff_ffff_ffff then I assume the casted value will be negative, only
>  it wasn't?
>

It seems like the simplest approach - if it's outside the range of a
positive int, set it to -1.

Paul

  reply	other threads:[~2008-05-07  1:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07  1:08 Paul Menage
2008-05-07  1:21 ` Li Zefan
2008-05-07  1:31 ` Andrew Morton
2008-05-07  1:40   ` Paul Jackson
2008-05-07  3:38     ` Reverting per-cpuset "system" (IRQ affinity) patch (was: Fix cpuset sched_relax_domain_level control file) Paul Jackson
2008-05-07  3:44       ` Andrew Morton
2008-05-07  3:52         ` Paul Jackson
2008-05-07  6:44           ` Peter Zijlstra
2008-05-08 17:56             ` Reverting per-cpuset "system" (IRQ affinity) patch Max Krasnyansky
2008-05-09 10:22               ` Ingo Molnar
2008-05-09 11:26                 ` Paul Jackson
2008-05-21  0:46                   ` Max Krasnyanskiy
2008-05-07  1:38 ` [PATCH] Fix cpuset sched_relax_domain_level control file Andrew Morton
2008-05-07  1:41   ` Paul Menage [this message]
2008-05-07  9:48     ` Adrian Bunk
2008-05-07 15:08       ` Andrew Morton
2008-05-07  1:46   ` Li Zefan
2008-05-07  1:49     ` Paul Jackson
2008-05-07  1:51       ` Paul Menage
2008-05-07  1:58         ` Paul Jackson
2008-05-07  2:08           ` Andrew Morton
2008-05-07  2:11             ` Paul Jackson
2008-05-07  2:15               ` Paul Menage
2008-05-07  2:28                 ` Andrew Morton
2008-05-07  2:32                 ` Paul Jackson
2008-05-07  2:12           ` Li Zefan
2008-05-07  2:17             ` Paul Jackson
2008-05-07  2:27             ` Hidetoshi Seto

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=6599ad830805061841n57232824s451c4e8788b7864d@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.com \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    /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

all inboxes | Powered by JetHome®