tools: Add err.h with ERR_PTR PTR_ERR interface
authorJiri Olsa <jolsa@kernel.org>
Mon, 7 Sep 2015 08:38:03 +0000 (10:38 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Sep 2015 12:48:32 +0000 (09:48 -0300)
commit01ca9fd41d6f2ad796a6b109b5253e06b6ae6dc7
tree59da19c7f1b5d716a0442229e40af73844b09b89
parent9bae1e8c3fe5359ce17309b894f54667fd563e98
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: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Raphael 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: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/linux/err.h [new file with mode: 0644]