[lkml]   [2004]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH][2.6] first/next_cpu returns values > NR_CPUS
    On Sun, 1 Aug 2004, William Lee Irwin III wrote:
    >> Maybe the few callers that are sensitive to the precise return value
    >> should use min_t(int, NR_CPUS, ...) instead of all callers taking the
    >> branch on behalf of those few.

    On Sun, Aug 01, 2004 at 10:54:03AM -0400, Zwane Mwaikambo wrote:
    > The problem is that next_cpu(0) will assign the incorrect value of '32'
    > to variable cpu so when you exit the loop, you'll have some silly number.
    > This really should be covered in the API, especially since that's what the
    > API states is the expected behaviour.

    I see. AFAICT this can also be dealt with by the caller and is far less
    common than total insensitivity to which value >= NR_CPUS is involved.

    -- wli
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:04    [W:0.044 / U:127.672 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site