Skip to content

Commit 1005dd0

Browse files
dgchinnerdchinner
authored andcommitted
xfs: convert dquot 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 3402d93 commit 1005dd0

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

fs/xfs/libxfs/xfs_format.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,10 +1085,10 @@ static inline bool xfs_dinode_has_bigtime(const struct xfs_dinode *dip)
10851085
#define XFS_DQUOT_MAGIC 0x4451 /* 'DQ' */
10861086
#define XFS_DQUOT_VERSION (uint8_t)0x01 /* latest version number */
10871087

1088-
#define XFS_DQTYPE_USER 0x01 /* user dquot record */
1089-
#define XFS_DQTYPE_PROJ 0x02 /* project dquot record */
1090-
#define XFS_DQTYPE_GROUP 0x04 /* group dquot record */
1091-
#define XFS_DQTYPE_BIGTIME 0x80 /* large expiry timestamps */
1088+
#define XFS_DQTYPE_USER (1u << 0) /* user dquot record */
1089+
#define XFS_DQTYPE_PROJ (1u << 1) /* project dquot record */
1090+
#define XFS_DQTYPE_GROUP (1u << 2) /* group dquot record */
1091+
#define XFS_DQTYPE_BIGTIME (1u << 7) /* large expiry timestamps */
10921092

10931093
/* bitmask to determine if this is a user/group/project dquot */
10941094
#define XFS_DQTYPE_REC_MASK (XFS_DQTYPE_USER | \

fs/xfs/libxfs/xfs_quota_defs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ typedef uint8_t xfs_dqtype_t;
2929
/*
3030
* flags for q_flags field in the dquot.
3131
*/
32-
#define XFS_DQFLAG_DIRTY (1 << 0) /* dquot is dirty */
33-
#define XFS_DQFLAG_FREEING (1 << 1) /* dquot is being torn down */
32+
#define XFS_DQFLAG_DIRTY (1u << 0) /* dquot is dirty */
33+
#define XFS_DQFLAG_FREEING (1u << 1) /* dquot is being torn down */
3434

3535
#define XFS_DQFLAG_STRINGS \
3636
{ XFS_DQFLAG_DIRTY, "DIRTY" }, \

0 commit comments

Comments
 (0)