Blob Blame History Raw
From 90215d74987159fdd7a6d800256ba1d2a9b0dca8 Mon Sep 17 00:00:00 2001
From: Dave Chinner <dchinner@redhat.com>
Date: Thu, 21 Apr 2022 10:47:25 +1000
Subject: [PATCH] xfs: convert ptag flags to unsigned.
Git-commit: 90215d74987159fdd7a6d800256ba1d2a9b0dca8
Patch-mainline: v5.19-rc1
References: git-fixes

5.18 w/ std=gnu11 compiled with gcc-5 wants flags stored in unsigned
fields to be unsigned.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Acked-by: Anthony Iliopoulos <ailiop@suse.com>

---
 fs/xfs/xfs_error.h   |   20 ++++++++++----------
 fs/xfs/xfs_message.c |    2 +-
 fs/xfs/xfs_message.h |    3 ++-
 3 files changed, 13 insertions(+), 12 deletions(-)

--- a/fs/xfs/xfs_error.h
+++ b/fs/xfs/xfs_error.h
@@ -64,15 +64,15 @@ extern int xfs_errortag_clearall(struct
  * XFS panic tags -- allow a call to xfs_alert_tag() be turned into
  *			a panic by setting xfs_panic_mask in a sysctl.
  */
-#define		XFS_NO_PTAG			0
-#define		XFS_PTAG_IFLUSH			0x00000001
-#define		XFS_PTAG_LOGRES			0x00000002
-#define		XFS_PTAG_AILDELETE		0x00000004
-#define		XFS_PTAG_ERROR_REPORT		0x00000008
-#define		XFS_PTAG_SHUTDOWN_CORRUPT	0x00000010
-#define		XFS_PTAG_SHUTDOWN_IOERROR	0x00000020
-#define		XFS_PTAG_SHUTDOWN_LOGERROR	0x00000040
-#define		XFS_PTAG_FSBLOCK_ZERO		0x00000080
-#define		XFS_PTAG_VERIFIER_ERROR		0x00000100
+#define		XFS_NO_PTAG			0u
+#define		XFS_PTAG_IFLUSH			(1u << 0)
+#define		XFS_PTAG_LOGRES			(1u << 1)
+#define		XFS_PTAG_AILDELETE		(1u << 2)
+#define		XFS_PTAG_ERROR_REPORT		(1u << 3)
+#define		XFS_PTAG_SHUTDOWN_CORRUPT	(1u << 4)
+#define		XFS_PTAG_SHUTDOWN_IOERROR	(1u << 5)
+#define		XFS_PTAG_SHUTDOWN_LOGERROR	(1u << 6)
+#define		XFS_PTAG_FSBLOCK_ZERO		(1u << 7)
+#define		XFS_PTAG_VERIFIER_ERROR		(1u << 8)
 
 #endif	/* __XFS_ERROR_H__ */
--- a/fs/xfs/xfs_message.c
+++ b/fs/xfs/xfs_message.c
@@ -62,7 +62,7 @@ define_xfs_printk_level(xfs_debug, KERN_
 void
 xfs_alert_tag(
 	const struct xfs_mount	*mp,
-	int			panic_tag,
+	uint32_t		panic_tag,
 	const char		*fmt, ...)
 {
 	struct va_format	vaf;
--- a/fs/xfs/xfs_message.h
+++ b/fs/xfs/xfs_message.h
@@ -11,7 +11,8 @@ void xfs_emerg(const struct xfs_mount *m
 extern __printf(2, 3)
 void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...);
 extern __printf(3, 4)
-void xfs_alert_tag(const struct xfs_mount *mp, int tag, const char *fmt, ...);
+void xfs_alert_tag(const struct xfs_mount *mp, uint32_t tag,
+		const char *fmt, ...);
 extern __printf(2, 3)
 void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...);
 extern __printf(2, 3)