xfs: convert log ticket and iclog flags to unsigned.
authorDave Chinner <dchinner@redhat.com>
Thu, 21 Apr 2022 00:48:01 +0000 (10:48 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 21 Apr 2022 00:48:01 +0000 (10:48 +1000)
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>
fs/xfs/xfs_log_priv.h

index 401cdc400980b07bba88fc1a6be6576c70e6a9d7..438df48a84c403966c72a38a8c2918432a0955ca 100644 (file)
@@ -51,8 +51,8 @@ enum xlog_iclog_state {
 /*
  * In core log flags
  */
-#define XLOG_ICL_NEED_FLUSH    (1 << 0)        /* iclog needs REQ_PREFLUSH */
-#define XLOG_ICL_NEED_FUA      (1 << 1)        /* iclog needs REQ_FUA */
+#define XLOG_ICL_NEED_FLUSH    (1u << 0)       /* iclog needs REQ_PREFLUSH */
+#define XLOG_ICL_NEED_FUA      (1u << 1)       /* iclog needs REQ_FUA */
 
 #define XLOG_ICL_STRINGS \
        { XLOG_ICL_NEED_FLUSH,  "XLOG_ICL_NEED_FLUSH" }, \
@@ -62,7 +62,7 @@ enum xlog_iclog_state {
 /*
  * Log ticket flags
  */
-#define XLOG_TIC_PERM_RESERV   0x1     /* permanent reservation */
+#define XLOG_TIC_PERM_RESERV   (1u << 0)       /* permanent reservation */
 
 #define XLOG_TIC_FLAGS \
        { XLOG_TIC_PERM_RESERV, "XLOG_TIC_PERM_RESERV" }
@@ -165,7 +165,7 @@ typedef struct xlog_ticket {
        char               t_ocnt;       /* original count               : 1  */
        char               t_cnt;        /* current count                : 1  */
        char               t_clientid;   /* who does this belong to;     : 1  */
-       char               t_flags;      /* properties of reservation    : 1  */
+       uint8_t            t_flags;      /* properties of reservation    : 1  */
 
         /* reservation array fields */
        uint               t_res_num;                    /* num in array : 4 */