Release 4.7 include/linux/err.h
#ifndef _LINUX_ERR_H
#define _LINUX_ERR_H
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/errno.h>
/*
* Kernel pointers have redundant information, so we can use a
* scheme where we can return either an error code or a normal
* pointer with the same return value.
*
* This should be a per-architecture thing, to allow different
* error and pointer decisions.
*/
#define MAX_ERRNO 4095
#ifndef __ASSEMBLY__
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
static inline void * __must_check ERR_PTR(long error)
{
return (void *) error;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
dave jones | dave jones | 18 | 94.74% | 1 | 50.00% |
jani nikula | jani nikula | 1 | 5.26% | 1 | 50.00% |
| Total | 19 | 100.00% | 2 | 100.00% |
static inline long __must_check PTR_ERR(__force const void *ptr)
{
return (long) ptr;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
dave jones | dave jones | 18 | 90.00% | 1 | 33.33% |
dan carpenter | dan carpenter | 1 | 5.00% | 1 | 33.33% |
jani nikula | jani nikula | 1 | 5.00% | 1 | 33.33% |
| Total | 20 | 100.00% | 3 | 100.00% |
static inline bool __must_check IS_ERR(__force const void *ptr)
{
return IS_ERR_VALUE((unsigned long)ptr);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
dave jones | dave jones | 18 | 75.00% | 1 | 16.67% |
andrew morton | andrew morton | 2 | 8.33% | 1 | 16.67% |
joe perches | joe perches | 1 | 4.17% | 1 | 16.67% |
jani nikula | jani nikula | 1 | 4.17% | 1 | 16.67% |
linus torvalds | linus torvalds | 1 | 4.17% | 1 | 16.67% |
dan carpenter | dan carpenter | 1 | 4.17% | 1 | 16.67% |
| Total | 24 | 100.00% | 6 | 100.00% |
static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
{
return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
phil carmody | phil carmody | 24 | 80.00% | 1 | 20.00% |
viresh kumar | viresh kumar | 3 | 10.00% | 1 | 20.00% |
jani nikula | jani nikula | 1 | 3.33% | 1 | 20.00% |
joe perches | joe perches | 1 | 3.33% | 1 | 20.00% |
dan carpenter | dan carpenter | 1 | 3.33% | 1 | 20.00% |
| Total | 30 | 100.00% | 5 | 100.00% |
/**
* ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
* @ptr: The pointer to cast.
*
* Explicitly cast an error-valued pointer to another pointer type in such a
* way as to make it clear that's what's going on.
*/
static inline void * __must_check ERR_CAST(__force const void *ptr)
{
/* cast away the const */
return (void *) ptr;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david howells | david howells | 21 | 91.30% | 1 | 33.33% |
jani nikula | jani nikula | 1 | 4.35% | 1 | 33.33% |
dan carpenter | dan carpenter | 1 | 4.35% | 1 | 33.33% |
| Total | 23 | 100.00% | 3 | 100.00% |
static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr)
{
if (IS_ERR(ptr))
return PTR_ERR(ptr);
else
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
uwe kleine-koenig | uwe kleine-koenig | 29 | 93.55% | 1 | 33.33% |
dan carpenter | dan carpenter | 1 | 3.23% | 1 | 33.33% |
rusty russell | rusty russell | 1 | 3.23% | 1 | 33.33% |
| Total | 31 | 100.00% | 3 | 100.00% |
/* Deprecated */
#define PTR_RET(p) PTR_ERR_OR_ZERO(p)
#endif
#endif /* _LINUX_ERR_H */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
dave jones | dave jones | 66 | 34.55% | 1 | 7.14% |
uwe kleine-koenig | uwe kleine-koenig | 29 | 15.18% | 1 | 7.14% |
phil carmody | phil carmody | 24 | 12.57% | 1 | 7.14% |
david howells | david howells | 22 | 11.52% | 1 | 7.14% |
rusty russell | rusty russell | 9 | 4.71% | 1 | 7.14% |
linus torvalds | linus torvalds | 8 | 4.19% | 2 | 14.29% |
joe perches | joe perches | 6 | 3.14% | 1 | 7.14% |
randy dunlap | randy dunlap | 5 | 2.62% | 1 | 7.14% |
jani nikula | jani nikula | 5 | 2.62% | 1 | 7.14% |
dan carpenter | dan carpenter | 5 | 2.62% | 1 | 7.14% |
andrew morton | andrew morton | 5 | 2.62% | 1 | 7.14% |
ralf baechle | ralf baechle | 4 | 2.09% | 1 | 7.14% |
viresh kumar | viresh kumar | 3 | 1.57% | 1 | 7.14% |
| Total | 191 | 100.00% | 14 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.