From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: hsiangkao@linux.alibaba.com, chao@kernel.org, huyue2@coolpad.com,
linux-erofs@lists.ozlabs.org
Subject: [PATCH 1/2] erofs-utils: add ERR_CAST macro
Date: Tue, 11 Jul 2023 14:12:39 +0800 [thread overview]
Message-ID: <20230711061240.23662-1-jefflexu@linux.alibaba.com> (raw)
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
next reply other threads:[~2023-07-11 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 6:12 Jingbo Xu [this message]
2023-07-11 6:12 ` [PATCH 2/2] erofs-utils: introduce tarerofs Jingbo Xu
2023-07-13 7:18 ` Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230711061240.23662-1-jefflexu@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=chao@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=huyue2@coolpad.com \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox