From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 06/17] xfs: convert AGF log flags to unsigned.
Date: Mon, 11 Apr 2022 10:31:36 +1000 [thread overview]
Message-ID: <20220411003147.2104423-7-david@fromorbit.com> (raw)
In-Reply-To: <20220411003147.2104423-1-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
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>
---
fs/xfs/libxfs/xfs_alloc.c | 10 +++++-----
fs/xfs/libxfs/xfs_alloc.h | 2 +-
fs/xfs/libxfs/xfs_format.h | 38 +++++++++++++++++++-------------------
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index b52ed339727f..1ff3fa67d4c9 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -2777,7 +2777,7 @@ xfs_alloc_get_freelist(
xfs_agblock_t bno;
__be32 *agfl_bno;
int error;
- int logflags;
+ uint32_t logflags;
struct xfs_mount *mp = tp->t_mountp;
struct xfs_perag *pag;
@@ -2830,9 +2830,9 @@ xfs_alloc_get_freelist(
*/
void
xfs_alloc_log_agf(
- xfs_trans_t *tp, /* transaction pointer */
- struct xfs_buf *bp, /* buffer for a.g. freelist header */
- int fields) /* mask of fields to be logged (XFS_AGF_...) */
+ struct xfs_trans *tp,
+ struct xfs_buf *bp,
+ uint32_t fields)
{
int first; /* first byte offset */
int last; /* last byte offset */
@@ -2902,7 +2902,7 @@ xfs_alloc_put_freelist(
struct xfs_perag *pag;
__be32 *blockp;
int error;
- int logflags;
+ uint32_t logflags;
__be32 *agfl_bno;
int startoff;
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h
index d4c057b764f9..84ca09b2223f 100644
--- a/fs/xfs/libxfs/xfs_alloc.h
+++ b/fs/xfs/libxfs/xfs_alloc.h
@@ -121,7 +121,7 @@ void
xfs_alloc_log_agf(
struct xfs_trans *tp, /* transaction pointer */
struct xfs_buf *bp, /* buffer for a.g. freelist header */
- int fields);/* mask of fields to be logged (XFS_AGF_...) */
+ uint32_t fields);/* mask of fields to be logged (XFS_AGF_...) */
/*
* Interface for inode allocation to force the pag data to be initialized.
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index d665c04e69dd..65e24847841e 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -525,26 +525,26 @@ typedef struct xfs_agf {
#define XFS_AGF_CRC_OFF offsetof(struct xfs_agf, agf_crc)
-#define XFS_AGF_MAGICNUM 0x00000001
-#define XFS_AGF_VERSIONNUM 0x00000002
-#define XFS_AGF_SEQNO 0x00000004
-#define XFS_AGF_LENGTH 0x00000008
-#define XFS_AGF_ROOTS 0x00000010
-#define XFS_AGF_LEVELS 0x00000020
-#define XFS_AGF_FLFIRST 0x00000040
-#define XFS_AGF_FLLAST 0x00000080
-#define XFS_AGF_FLCOUNT 0x00000100
-#define XFS_AGF_FREEBLKS 0x00000200
-#define XFS_AGF_LONGEST 0x00000400
-#define XFS_AGF_BTREEBLKS 0x00000800
-#define XFS_AGF_UUID 0x00001000
-#define XFS_AGF_RMAP_BLOCKS 0x00002000
-#define XFS_AGF_REFCOUNT_BLOCKS 0x00004000
-#define XFS_AGF_REFCOUNT_ROOT 0x00008000
-#define XFS_AGF_REFCOUNT_LEVEL 0x00010000
-#define XFS_AGF_SPARE64 0x00020000
+#define XFS_AGF_MAGICNUM (1u << 0)
+#define XFS_AGF_VERSIONNUM (1u << 1)
+#define XFS_AGF_SEQNO (1u << 2)
+#define XFS_AGF_LENGTH (1u << 3)
+#define XFS_AGF_ROOTS (1u << 4)
+#define XFS_AGF_LEVELS (1u << 5)
+#define XFS_AGF_FLFIRST (1u << 6)
+#define XFS_AGF_FLLAST (1u << 7)
+#define XFS_AGF_FLCOUNT (1u << 8)
+#define XFS_AGF_FREEBLKS (1u << 9)
+#define XFS_AGF_LONGEST (1u << 10)
+#define XFS_AGF_BTREEBLKS (1u << 11)
+#define XFS_AGF_UUID (1u << 12)
+#define XFS_AGF_RMAP_BLOCKS (1u << 13)
+#define XFS_AGF_REFCOUNT_BLOCKS (1u << 14)
+#define XFS_AGF_REFCOUNT_ROOT (1u << 15)
+#define XFS_AGF_REFCOUNT_LEVEL (1u << 16)
+#define XFS_AGF_SPARE64 (1u << 17)
#define XFS_AGF_NUM_BITS 18
-#define XFS_AGF_ALL_BITS ((1 << XFS_AGF_NUM_BITS) - 1)
+#define XFS_AGF_ALL_BITS ((1u << XFS_AGF_NUM_BITS) - 1)
#define XFS_AGF_FLAGS \
{ XFS_AGF_MAGICNUM, "MAGICNUM" }, \
--
2.35.1
next prev parent reply other threads:[~2022-04-11 0:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 0:31 [PATCH 00/17] xfs: unsigned flags conversion for c11 Dave Chinner
2022-04-11 0:31 ` [PATCH 01/17] xfs: convert buffer flags to unsigned Dave Chinner
2022-04-11 10:05 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 02/17] xfs: convert attr type " Dave Chinner
2022-04-11 10:23 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 03/17] xfs: convert scrub " Dave Chinner
2022-04-11 10:33 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 04/17] xfs: convert bmap extent " Dave Chinner
2022-04-11 10:42 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 05/17] xfs: convert bmapi " Dave Chinner
2022-04-11 12:53 ` Chandan Babu R
2022-04-11 13:44 ` Chandan Babu R
2022-04-11 0:31 ` Dave Chinner [this message]
2022-04-11 13:27 ` [PATCH 06/17] xfs: convert AGF log " Chandan Babu R
2022-04-11 0:31 ` [PATCH 07/17] xfs: convert AGI " Dave Chinner
2022-04-11 13:49 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 08/17] xfs: convert btree buffer " Dave Chinner
2022-04-11 14:03 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 09/17] xfs: convert buffer log item " Dave Chinner
2022-04-12 7:25 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 10/17] xfs: convert da btree operations " Dave Chinner
2022-04-12 7:25 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 11/17] xfs: convert dquot " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 12/17] xfs: convert log item tracepoint " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 13/17] xfs: convert inode lock " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-12 8:43 ` Dave Chinner
2022-04-21 0:44 ` [PATCH 13/17 v2] " Dave Chinner
2022-04-21 3:07 ` Alli
2022-04-21 9:15 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 14/17] xfs: convert ptag " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 15/17] xfs: convert quota options " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 16/17] xfs: convert shutdown reasons " Dave Chinner
2022-04-12 7:27 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 17/17] xfs: convert log ticket and iclog flags " Dave Chinner
2022-04-12 7:27 ` Chandan Babu R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220411003147.2104423-7-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.