The patch titled Add an ERR_CAST() function to complement ERR_PTR and co. has been added to the -mm tree. Its filename is add-an-err_cast-function-to-complement-err_ptr-and-co.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Add an ERR_CAST() function to complement ERR_PTR and co. From: David Howells <dhowells@xxxxxxxxxx> Add an ERR_CAST() function to complement ERR_PTR and co. for the purposes of casting an error entyped as one pointer type to an error of another pointer type whilst making it explicit as to what is going on. This provides a replacement for the ERR_PTR(PTR_ERR(p)) construct. Signed-off-by: David Howells <dhowells@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/err.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff -puN include/linux/err.h~add-an-err_cast-function-to-complement-err_ptr-and-co include/linux/err.h --- a/include/linux/err.h~add-an-err_cast-function-to-complement-err_ptr-and-co +++ a/include/linux/err.h @@ -34,6 +34,19 @@ static inline long IS_ERR(const void *pt return IS_ERR_VALUE((unsigned long)ptr); } +/** + * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type + * @ptr: The pointer to cast. + * + * Explicitly cast an error-valued pointer to another pointer type in such a + * way as to make it clear that's what's going on. + */ +static inline void *ERR_CAST(const void *ptr) +{ + /* cast away the const */ + return (void *) ptr; +} + #endif #endif /* _LINUX_ERR_H */ _ Patches currently in -mm which might be from dhowells@xxxxxxxxxx are origin.patch 64-bit-i_version-afs-fixes.patch add-an-err_cast-function-to-complement-err_ptr-and-co.patch convert-err_ptrptr_errp-instances-to-err_castp.patch iget-introduce-a-function-to-register-iget-failure.patch iget-use-iget_failed-in-afs.patch iget-use-iget_failed-in-gfs2.patch iget-stop-affs-from-using-iget-and-read_inode-try.patch iget-stop-autofs-from-using-iget-and-read_inode.patch iget-stop-befs-from-using-iget-and-read_inode-try.patch iget-stop-bfs-from-using-iget-and-read_inode-try.patch iget-stop-cifs-from-using-iget-and-read_inode-try.patch iget-stop-efs-from-using-iget-and-read_inode-try.patch iget-stop-ext2-from-using-iget-and-read_inode-try.patch iget-stop-ext3-from-using-iget-and-read_inode-try.patch iget-stop-ext4-from-using-iget-and-read_inode-try.patch iget-stop-fat-from-using-iget-and-read_inode-try.patch iget-stop-freevxfs-from-using-iget-and-read_inode.patch iget-stop-fuse-from-using-iget-and-read_inode-try.patch iget-stop-hfsplus-from-using-iget-and-read_inode.patch iget-stop-isofs-from-using-read_inode.patch iget-stop-jffs2-from-using-iget-and-read_inode.patch iget-stop-jfs-from-using-iget-and-read_inode-try.patch iget-stop-the-minix-filesystem-from-using-iget-and.patch iget-stop-procfs-from-using-iget-and-read_inode.patch iget-stop-qnx4-from-using-iget-and-read_inode-try.patch iget-stop-romfs-from-using-iget-and-read_inode.patch iget-stop-the-sysv-filesystem-from-using-iget-and.patch iget-stop-ufs-from-using-iget-and-read_inode-try.patch iget-stop-openpromfs-from-using-iget-and.patch iget-stop-hostfs-from-using-iget-and-read_inode.patch iget-stop-hppfs-from-using-iget-and-read_inode.patch iget-remove-iget-and-the-read_inode-super-op-as.patch mutex-subsystem-synchro-test-module.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html