All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH liburing 0/2] Update .gitignore and fix 32-bit build
@ 2021-09-16  4:27 Ammar Faizi
  2021-09-16  4:27 ` [PATCH liburing 1/2] .gitignore: add `test/file-verify` Ammar Faizi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ammar Faizi @ 2021-09-16  4:27 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring

- Add test/file-verify to .gitignore.
- Fix 32-bit build

----------------------------------------------------------------
Ammar Faizi (2):
      .gitignore: add `test/file-verify`
      test/file-verify: fix 32-bit build -Werror=shift-count-overflow

 .gitignore         | 1 +
 test/file-verify.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH liburing 1/2] .gitignore: add `test/file-verify`
  2021-09-16  4:27 [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Ammar Faizi
@ 2021-09-16  4:27 ` Ammar Faizi
  2021-09-16  4:31   ` [PATCH liburing v2 " Ammar Faizi
  2021-09-16  4:27 ` [PATCH liburing 2/2] test/file-verify: fix 32-bit build -Werror=shift-count-overflow Ammar Faizi
  2021-09-16 15:17 ` [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Jens Axboe
  2 siblings, 1 reply; 5+ messages in thread
From: Ammar Faizi @ 2021-09-16  4:27 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring, Ammar Faizi

Signed-off-by: Ammar Faizi <ammarfaizi2@gmail.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 45f3cde..bd0623a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@
 /test/fc2a85cb02ef-test
 /test/file-register
 /test/file-update
+test/file-verify
 /test/files-exit-hang-poll
 /test/files-exit-hang-timeout
 /test/fixed-link
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH liburing 2/2] test/file-verify: fix 32-bit build -Werror=shift-count-overflow
  2021-09-16  4:27 [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Ammar Faizi
  2021-09-16  4:27 ` [PATCH liburing 1/2] .gitignore: add `test/file-verify` Ammar Faizi
@ 2021-09-16  4:27 ` Ammar Faizi
  2021-09-16 15:17 ` [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: Ammar Faizi @ 2021-09-16  4:27 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring, Ammar Faizi

`off_t` may not always be 64-bit in size.
```
  file-verify.c: In function 'test':
  file-verify.c:193:26: error: left shift count >= width of type [-Werror=shift-count-overflow]
      sqe->user_data = (off << 32) | i;
                            ^
  cc1: all warnings being treated as errors
  Makefile:164: recipe for target 'file-verify' failed
  make[1]: *** [file-verify] Error 1
  make[1]: Leaving directory '/root/liburing/test'
  Makefile:12: recipe for target 'all' failed
  make: *** [all] Error 2
```
Fix this by using (uint64_t) cast.

Signed-off-by: Ammar Faizi <ammarfaizi2@gmail.com>
---
 test/file-verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/file-verify.c b/test/file-verify.c
index ffedd87..cd6c4de 100644
--- a/test/file-verify.c
+++ b/test/file-verify.c
@@ -190,7 +190,7 @@ static int test(struct io_uring *ring, const char *fname, int buffered,
 				else
 					io_uring_prep_read(sqe, fd, buf[i], this, off);
 			}
-			sqe->user_data = (off << 32) | i;
+			sqe->user_data = ((uint64_t)off << 32) | i;
 			off += this;
 			left -= this;
 			pending++;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH liburing v2 1/2] .gitignore: add `test/file-verify`
  2021-09-16  4:27 ` [PATCH liburing 1/2] .gitignore: add `test/file-verify` Ammar Faizi
@ 2021-09-16  4:31   ` Ammar Faizi
  0 siblings, 0 replies; 5+ messages in thread
From: Ammar Faizi @ 2021-09-16  4:31 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring, Ammar Faizi

Signed-off-by: Ammar Faizi <ammarfaizi2@gmail.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

v2: Forgot leading slash.

diff --git a/.gitignore b/.gitignore
index 45f3cde..bd0623a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@
 /test/fc2a85cb02ef-test
 /test/file-register
 /test/file-update
+/test/file-verify
 /test/files-exit-hang-poll
 /test/files-exit-hang-timeout
 /test/fixed-link
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH liburing 0/2] Update .gitignore and fix 32-bit build
  2021-09-16  4:27 [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Ammar Faizi
  2021-09-16  4:27 ` [PATCH liburing 1/2] .gitignore: add `test/file-verify` Ammar Faizi
  2021-09-16  4:27 ` [PATCH liburing 2/2] test/file-verify: fix 32-bit build -Werror=shift-count-overflow Ammar Faizi
@ 2021-09-16 15:17 ` Jens Axboe
  2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2021-09-16 15:17 UTC (permalink / raw)
  To: Ammar Faizi; +Cc: io-uring

On 9/15/21 10:27 PM, Ammar Faizi wrote:
> - Add test/file-verify to .gitignore.
> - Fix 32-bit build
> 
> ----------------------------------------------------------------
> Ammar Faizi (2):
>       .gitignore: add `test/file-verify`
>       test/file-verify: fix 32-bit build -Werror=shift-count-overflow
> 
>  .gitignore         | 1 +
>  test/file-verify.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-16 15:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16  4:27 [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Ammar Faizi
2021-09-16  4:27 ` [PATCH liburing 1/2] .gitignore: add `test/file-verify` Ammar Faizi
2021-09-16  4:31   ` [PATCH liburing v2 " Ammar Faizi
2021-09-16  4:27 ` [PATCH liburing 2/2] test/file-verify: fix 32-bit build -Werror=shift-count-overflow Ammar Faizi
2021-09-16 15:17 ` [PATCH liburing 0/2] Update .gitignore and fix 32-bit build Jens Axboe

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.