lkml.org 
[lkml]   [2010]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] lib/atomic64_test: do not build on non-atomic64 systems
    On Sat, 16 Oct 2010 13:27:15 -0400
    Mike Frysinger <vapier@gentoo.org> wrote:

    > If the arch doesn't provide atomic64 functionality (there are quite a
    > few), then don't bother trying to build this test.
    >

    I don't get it. If the arch doesn't implement atomic64 then this file
    will get zillions of build errors, won't it?

    > diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
    > index 250ed11..0ac1a66 100644
    > --- a/lib/atomic64_test.c
    > +++ b/lib/atomic64_test.c
    > @@ -12,6 +12,8 @@
    > #include <linux/kernel.h>
    > #include <asm/atomic.h>
    >
    > +#ifdef ATOMIC64_INIT

    hm, that's a bit lazy. It should really use a CONFIG_HAVE_ thing. What
    a pita.

    > #define INIT(c) do { atomic64_set(&v, c); r = c; } while (0)
    > static __init int test_atomic64(void)
    > {
    > @@ -164,3 +166,5 @@ static __init int test_atomic64(void)
    > }
    >
    > core_initcall(test_atomic64);
    > +
    > +#endif
    > --
    > 1.7.3.1


    \
     
     \ /
      Last update: 2010-10-22 00:07    [W:0.021 / U:0.080 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site