Skip to content

Commit 0d1b976

Browse files
dgchinnerdchinner
authored andcommitted
xfs: convert AGI log 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 f53dde1 commit 0d1b976

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

fs/xfs/libxfs/xfs_format.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -619,22 +619,22 @@ typedef struct xfs_agi {
619619

620620
#define XFS_AGI_CRC_OFF offsetof(struct xfs_agi, agi_crc)
621621

622-
#define XFS_AGI_MAGICNUM (1 << 0)
623-
#define XFS_AGI_VERSIONNUM (1 << 1)
624-
#define XFS_AGI_SEQNO (1 << 2)
625-
#define XFS_AGI_LENGTH (1 << 3)
626-
#define XFS_AGI_COUNT (1 << 4)
627-
#define XFS_AGI_ROOT (1 << 5)
628-
#define XFS_AGI_LEVEL (1 << 6)
629-
#define XFS_AGI_FREECOUNT (1 << 7)
630-
#define XFS_AGI_NEWINO (1 << 8)
631-
#define XFS_AGI_DIRINO (1 << 9)
632-
#define XFS_AGI_UNLINKED (1 << 10)
622+
#define XFS_AGI_MAGICNUM (1u << 0)
623+
#define XFS_AGI_VERSIONNUM (1u << 1)
624+
#define XFS_AGI_SEQNO (1u << 2)
625+
#define XFS_AGI_LENGTH (1u << 3)
626+
#define XFS_AGI_COUNT (1u << 4)
627+
#define XFS_AGI_ROOT (1u << 5)
628+
#define XFS_AGI_LEVEL (1u << 6)
629+
#define XFS_AGI_FREECOUNT (1u << 7)
630+
#define XFS_AGI_NEWINO (1u << 8)
631+
#define XFS_AGI_DIRINO (1u << 9)
632+
#define XFS_AGI_UNLINKED (1u << 10)
633633
#define XFS_AGI_NUM_BITS_R1 11 /* end of the 1st agi logging region */
634-
#define XFS_AGI_ALL_BITS_R1 ((1 << XFS_AGI_NUM_BITS_R1) - 1)
635-
#define XFS_AGI_FREE_ROOT (1 << 11)
636-
#define XFS_AGI_FREE_LEVEL (1 << 12)
637-
#define XFS_AGI_IBLOCKS (1 << 13) /* both inobt/finobt block counters */
634+
#define XFS_AGI_ALL_BITS_R1 ((1u << XFS_AGI_NUM_BITS_R1) - 1)
635+
#define XFS_AGI_FREE_ROOT (1u << 11)
636+
#define XFS_AGI_FREE_LEVEL (1u << 12)
637+
#define XFS_AGI_IBLOCKS (1u << 13) /* both inobt/finobt block counters */
638638
#define XFS_AGI_NUM_BITS_R2 14
639639

640640
/* disk block (xfs_daddr_t) in the AG */

fs/xfs/libxfs/xfs_ialloc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,9 +2414,9 @@ xfs_imap(
24142414
*/
24152415
void
24162416
xfs_ialloc_log_agi(
2417-
xfs_trans_t *tp, /* transaction pointer */
2418-
struct xfs_buf *bp, /* allocation group header buffer */
2419-
int fields) /* bitmask of fields to log */
2417+
struct xfs_trans *tp,
2418+
struct xfs_buf *bp,
2419+
uint32_t fields)
24202420
{
24212421
int first; /* first byte number */
24222422
int last; /* last byte number */

fs/xfs/libxfs/xfs_ialloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void
6060
xfs_ialloc_log_agi(
6161
struct xfs_trans *tp, /* transaction pointer */
6262
struct xfs_buf *bp, /* allocation group header buffer */
63-
int fields); /* bitmask of fields to log */
63+
uint32_t fields); /* bitmask of fields to log */
6464

6565
/*
6666
* Read in the allocation group header (inode allocation section)

0 commit comments

Comments
 (0)