lkml.org 
[lkml]   [2003]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params
    On Wed, Jul 02, 2003 at 01:36:03PM +1000, Peter Chubb wrote:
    > Platforms that never expect to deal with a 64-bit number just redefine
    > the macro in terms of long. Which means that printing out long longs

    this doesn't even sounds safe. If it's just for printing not a big deal,
    but there may be functional usages where they should not truncate the
    high 32bit of the 64bit words.

    Bernardo, you should definitely add an #if BITS_PER_LONG == 64 around
    your implementation of do_div in asm-generic, just to make an example
    sparc is still silenty broken (and that's not an embedded thing).

    In the #else path of the generic implementation you can consider adding
    another version that casts to (long long), then as worse it will spwan a
    link compile time failure. But if it compiles it won't generate runtime
    failures. so basically it's up to gcc to do the right thing then.

    Andrea
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:46    [W:0.021 / U:30.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site