Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] erofs-utils: add ERR_CAST macro
@ 2023-07-11  6:12 Jingbo Xu
  2023-07-11  6:12 ` [PATCH 2/2] erofs-utils: introduce tarerofs Jingbo Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Jingbo Xu @ 2023-07-11  6:12 UTC (permalink / raw)
  To: hsiangkao, chao, huyue2, linux-erofs

Add ERR_CAST macro to prepare for the upcoming tarerofs feature.

Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
 include/erofs/err.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/erofs/err.h b/include/erofs/err.h
index 08b0bdb..2ae9e21 100644
--- 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
-- 
2.19.1.6.gb485710b


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-13  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11  6:12 [PATCH 1/2] erofs-utils: add ERR_CAST macro Jingbo Xu
2023-07-11  6:12 ` [PATCH 2/2] erofs-utils: introduce tarerofs Jingbo Xu
2023-07-13  7:18   ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox