01 Oct, 2015

1 commit

  • The error variable breaks build on CentOS 6.7, due to collision with
    global error symbol:

    CC util/evlist.o
    cc1: warnings being treated as errors
    In file included from util/evlist.c:28:
    tools/include/linux/err.h: In function ‘ERR_PTR’:
    tools/include/linux/err.h:34: error: declaration of ‘error’ shadows a global declaration
    util/util.h:135: error: shadowed declaration is here

    Using 'error_' name instead to fix it.

    Signed-off-by: Jiri Olsa
    Link: http://lkml.kernel.org/n/tip-i9mdgdbrgauy3fe76s9rd125@git.kernel.org
    Reported-by: Vinson Lee
    [ Use 'error_' instead of 'err' to, visually, not diverge too much from include/linux/err.h ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

15 Sep, 2015

1 commit

  • Adding part of the kernel's interface:

    inline void * __must_check ERR_PTR(long error);
    inline long __must_check PTR_ERR(__force const void *ptr);
    inline bool __must_check IS_ERR(__force const void *ptr);

    It will be used to propagate error through pointers in following
    patches.

    Signed-off-by: Jiri Olsa
    Reviewed-by: Raphael Beamonte
    Cc: David Ahern
    Cc: Matt Fleming
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1441615087-13886-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa