Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133793509
D27577.id80857.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
984 B
Referenced Files
None
Subscribers
None
D27577.id80857.diff
View Options
Index: head/sys/compat/linuxkpi/common/include/linux/err.h
===================================================================
--- head/sys/compat/linuxkpi/common/include/linux/err.h
+++ head/sys/compat/linuxkpi/common/include/linux/err.h
@@ -37,30 +37,30 @@
#define MAX_ERRNO 4095
-#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
+#define IS_ERR_VALUE(x) unlikely((x) >= (uintptr_t)-MAX_ERRNO)
static inline void *
ERR_PTR(long error)
{
- return (void *)error;
+ return (void *)(intptr_t)error;
}
static inline long
PTR_ERR(const void *ptr)
{
- return (long)ptr;
+ return (intptr_t)ptr;
}
-static inline long
+static inline bool
IS_ERR(const void *ptr)
{
- return IS_ERR_VALUE((unsigned long)ptr);
+ return IS_ERR_VALUE((uintptr_t)ptr);
}
-static inline long
+static inline bool
IS_ERR_OR_NULL(const void *ptr)
{
- return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+ return !ptr || IS_ERR_VALUE((uintptr_t)ptr);
}
static inline void *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 29, 11:21 AM (1 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24364762
Default Alt Text
D27577.id80857.diff (984 B)
Attached To
Mode
D27577: Cleanups to *ERR* compat shims.
Attached
Detach File
Event Timeline
Log In to Comment