projects
/
platform
/
upstream
/
erofs-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d44a3d
)
erofs-utils: add ERR_CAST macro
author
Jingbo Xu
<jefflexu@linux.alibaba.com>
Tue, 11 Jul 2023 06:12:39 +0000
(14:12 +0800)
committer
Gao Xiang
<hsiangkao@linux.alibaba.com>
Tue, 11 Jul 2023 06:17:59 +0000
(14:17 +0800)
Add ERR_CAST macro to prepare for the upcoming tarerofs feature.
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Link:
https://lore.kernel.org/r/20230711061240.23662-1-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
include/erofs/err.h
patch
|
blob
|
history
diff --git
a/include/erofs/err.h
b/include/erofs/err.h
index 08b0bdba59e1bcde62a50920f513b9f97304c18f..2ae9e215a28bd1bea21590bd18c08917f334c20b 100644
(file)
--- a/
include/erofs/err.h
+++ b/
include/erofs/err.h
@@
-33,6
+33,12
@@
static inline long PTR_ERR(const void *ptr)
return (long) ptr;
}
+static inline void * ERR_CAST(const void *ptr)
+{
+ /* cast away the const */
+ return (void *) ptr;
+}
+
#ifdef __cplusplus
}
#endif