Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.8-rc7 18 lines 377 B view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __ERR_H__ 3#define __ERR_H__ 4 5#define MAX_ERRNO 4095 6#define IS_ERR_VALUE(x) (unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO 7 8static inline int IS_ERR_OR_NULL(const void *ptr) 9{ 10 return !ptr || IS_ERR_VALUE((unsigned long)ptr); 11} 12 13static inline long PTR_ERR(const void *ptr) 14{ 15 return (long) ptr; 16} 17 18#endif /* __ERR_H__ */