All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org, linux-xfs@vger.kernel.org
Cc: hch@lst.de, andres@anarazel.de, david@fromorbit.com,
	djwong@kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 9/9] iomap: use an unsigned type for IOMAP_DIO_* defines
Date: Fri, 21 Jul 2023 10:16:50 -0600	[thread overview]
Message-ID: <20230721161650.319414-10-axboe@kernel.dk> (raw)
In-Reply-To: <20230721161650.319414-1-axboe@kernel.dk>

IOMAP_DIO_DIRTY shifts by 31 bits, which makes UBSAN unhappy. Clean up
all the defines by making the shifted value an unsigned value.

Reported-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 fs/iomap/direct-io.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index ae9046d16d71..dc9fe2ac9136 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -20,12 +20,12 @@
  * Private flags for iomap_dio, must not overlap with the public ones in
  * iomap.h:
  */
-#define IOMAP_DIO_CALLER_COMP	(1 << 26)
-#define IOMAP_DIO_INLINE_COMP	(1 << 27)
-#define IOMAP_DIO_WRITE_THROUGH	(1 << 28)
-#define IOMAP_DIO_NEED_SYNC	(1 << 29)
-#define IOMAP_DIO_WRITE		(1 << 30)
-#define IOMAP_DIO_DIRTY		(1 << 31)
+#define IOMAP_DIO_CALLER_COMP	(1U << 26)
+#define IOMAP_DIO_INLINE_COMP	(1U << 27)
+#define IOMAP_DIO_WRITE_THROUGH	(1U << 28)
+#define IOMAP_DIO_NEED_SYNC	(1U << 29)
+#define IOMAP_DIO_WRITE		(1U << 30)
+#define IOMAP_DIO_DIRTY		(1U << 31)
 
 struct iomap_dio {
 	struct kiocb		*iocb;
-- 
2.40.1


  parent reply	other threads:[~2023-07-21 16:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 16:16 [PATCHSET v5 0/9] Improve async iomap DIO performance Jens Axboe
2023-07-21 16:16 ` [PATCH 1/9] iomap: cleanup up iomap_dio_bio_end_io() Jens Axboe
2023-07-21 16:16 ` [PATCH 2/9] iomap: add IOMAP_DIO_INLINE_COMP Jens Axboe
2023-07-21 16:16 ` [PATCH 3/9] iomap: treat a write through cache the same as FUA Jens Axboe
2023-07-21 16:25   ` Darrick J. Wong
2023-07-21 16:27     ` Jens Axboe
2023-07-21 16:47       ` Darrick J. Wong
2023-07-21 16:52         ` Jens Axboe
2023-07-21 16:16 ` [PATCH 4/9] iomap: completed polled IO inline Jens Axboe
2023-07-21 16:16 ` [PATCH 5/9] iomap: only set iocb->private for polled bio Jens Axboe
2023-07-21 16:16 ` [PATCH 6/9] fs: add IOCB flags related to passing back dio completions Jens Axboe
2023-07-21 16:28   ` Darrick J. Wong
2023-07-21 16:30     ` Jens Axboe
2023-07-21 16:43       ` Jens Axboe
2023-07-21 16:16 ` [PATCH 7/9] io_uring/rw: add write support for IOCB_DIO_CALLER_COMP Jens Axboe
2023-07-21 16:29   ` Darrick J. Wong
2023-07-21 16:16 ` [PATCH 8/9] iomap: support IOCB_DIO_CALLER_COMP Jens Axboe
2023-07-21 16:16 ` Jens Axboe [this message]
2023-07-21 16:29   ` [PATCH 9/9] iomap: use an unsigned type for IOMAP_DIO_* defines Darrick J. Wong
2023-07-24 16:36   ` Christoph Hellwig

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=20230721161650.319414-10-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=andres@anarazel.de \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=io-uring@vger.kernel.org \
    --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.