[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240829074538.36669-1-shenlichuan@vivo.com>
Date: Thu, 29 Aug 2024 15:45:38 +0800
From: Shen Lichuan <shenlichuan@...o.com>
To: phillip@...ashfs.org.uk
Cc: linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Shen Lichuan <shenlichuan@...o.com>
Subject: [PATCH v1] Squashfs: convert to use ERR_CAST()
Use ERR_CAST() as it is designed for casting an error pointer to
another type.
This macro uses the __force and __must_check modifiers, which are used
to tell the compiler to check for errors where this macro is used.
Signed-off-by: Shen Lichuan <shenlichuan@...o.com>
---
fs/squashfs/xattr_id.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/squashfs/xattr_id.c b/fs/squashfs/xattr_id.c
index c8469c656e0d..eacfdcdf56a8 100644
--- a/fs/squashfs/xattr_id.c
+++ b/fs/squashfs/xattr_id.c
@@ -67,7 +67,7 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 table_start,
id_table = squashfs_read_table(sb, table_start, sizeof(*id_table));
if (IS_ERR(id_table))
- return (__le64 *) id_table;
+ return ERR_CAST(id_table);
*xattr_table_start = le64_to_cpu(id_table->xattr_table_start);
*xattr_ids = le32_to_cpu(id_table->xattr_ids);
--
2.17.1
Powered by blists - more mailing lists