• Zheng Liu's avatar
    perf test: fix a build error on builtin-test · 12f8f74b
    Zheng Liu authored
    Recently I build perf and get a build error on builtin-test.c. The error is as
    following:
    
    $ make
        CC perf.o
        CC builtin-test.o
    cc1: warnings being treated as errors
    builtin-test.c: In function ‘sched__get_first_possible_cpu’:
    builtin-test.c:977: warning: implicit declaration of function ‘CPU_ALLOC’
    builtin-test.c:977: warning: nested extern declaration of ‘CPU_ALLOC’
    builtin-test.c:977: warning: assignment makes pointer from integer without a cast
    builtin-test.c:978: warning: implicit declaration of function ‘CPU_ALLOC_SIZE’
    builtin-test.c:978: warning: nested extern declaration of ‘CPU_ALLOC_SIZE’
    builtin-test.c:979: warning: implicit declaration of function ‘CPU_ZERO_S’
    builtin-test.c:979: warning: nested extern declaration of ‘CPU_ZERO_S’
    builtin-test.c:982: warning: implicit declaration of function ‘CPU_FREE’
    builtin-test.c:982: warning: nested extern declaration of ‘CPU_FREE’
    builtin-test.c:992: warning: implicit declaration of function ‘CPU_ISSET_S’
    builtin-test.c:992: warning: nested extern declaration of ‘CPU_ISSET_S’
    builtin-test.c:998: warning: implicit declaration of function ‘CPU_CLR_S’
    builtin-test.c:998: warning: nested extern declaration of ‘CPU_CLR_S’
    make: *** [builtin-test.o] Error 1
    
    This problem is introduced in 3e7c439a. CPU_ALLOC and related macros are
    missing in sched__get_first_possible_cpu function. In 54489c18, commiter
    mentioned that CPU_ALLOC has been removed. So CPU_ALLOC calls in this
    function are removed to let perf to be built.
    Signed-off-by: default avatarVinson Lee <vlee@twitter.com>
    Signed-off-by: default avatarZheng Liu <wenqing.lz@taobao.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Vinson Lee <vlee@twitter.com>
    Cc: Zheng Liu <wenqing.lz@taobao.com>
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1352422726-31114-1-git-send-email-vlee@twitter.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    12f8f74b
builtin-test.c 35.3 KB