Skip to content

Commit 90215d7

Browse files
dgchinnerdchinner
authored andcommitted
xfs: convert ptag flags to unsigned.
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>
1 parent a103375 commit 90215d7

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

fs/xfs/xfs_error.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ extern int xfs_errortag_clearall(struct xfs_mount *mp);
6464
* XFS panic tags -- allow a call to xfs_alert_tag() be turned into
6565
* a panic by setting xfs_panic_mask in a sysctl.
6666
*/
67-
#define XFS_NO_PTAG 0
68-
#define XFS_PTAG_IFLUSH 0x00000001
69-
#define XFS_PTAG_LOGRES 0x00000002
70-
#define XFS_PTAG_AILDELETE 0x00000004
71-
#define XFS_PTAG_ERROR_REPORT 0x00000008
72-
#define XFS_PTAG_SHUTDOWN_CORRUPT 0x00000010
73-
#define XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
74-
#define XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
75-
#define XFS_PTAG_FSBLOCK_ZERO 0x00000080
76-
#define XFS_PTAG_VERIFIER_ERROR 0x00000100
67+
#define XFS_NO_PTAG 0u
68+
#define XFS_PTAG_IFLUSH (1u << 0)
69+
#define XFS_PTAG_LOGRES (1u << 1)
70+
#define XFS_PTAG_AILDELETE (1u << 2)
71+
#define XFS_PTAG_ERROR_REPORT (1u << 3)
72+
#define XFS_PTAG_SHUTDOWN_CORRUPT (1u << 4)
73+
#define XFS_PTAG_SHUTDOWN_IOERROR (1u << 5)
74+
#define XFS_PTAG_SHUTDOWN_LOGERROR (1u << 6)
75+
#define XFS_PTAG_FSBLOCK_ZERO (1u << 7)
76+
#define XFS_PTAG_VERIFIER_ERROR (1u << 8)
7777

7878
#define XFS_PTAG_STRINGS \
7979
{ XFS_NO_PTAG, "none" }, \

fs/xfs/xfs_message.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ define_xfs_printk_level(xfs_debug, KERN_DEBUG);
6262
void
6363
xfs_alert_tag(
6464
const struct xfs_mount *mp,
65-
int panic_tag,
65+
uint32_t panic_tag,
6666
const char *fmt, ...)
6767
{
6868
struct va_format vaf;

fs/xfs/xfs_message.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...);
1111
extern __printf(2, 3)
1212
void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...);
1313
extern __printf(3, 4)
14-
void xfs_alert_tag(const struct xfs_mount *mp, int tag, const char *fmt, ...);
14+
void xfs_alert_tag(const struct xfs_mount *mp, uint32_t tag,
15+
const char *fmt, ...);
1516
extern __printf(2, 3)
1617
void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...);
1718
extern __printf(2, 3)

0 commit comments

Comments
 (0)