Skip to content
Commit 01ca9fd4 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

tools: Add err.h with ERR_PTR PTR_ERR interface



Adding part of the kernel's <linux/err.h> 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: default avatarJiri Olsa <jolsa@kernel.org>
Reviewed-by: default avatarRaphael Beamonte <raphael.beamonte@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1441615087-13886-2-git-send-email-jolsa@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9bae1e8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment