Skip to contentSkip to conversation

linux-next: build warnings after merge of the block tree

DISCUSSION Stephen Rothwell 3 participants 6 messages Feb 6, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

In file included from /home/sfr/next/next/include/linux/bits.h:6,

                 from /home/sfr/next/next/include/linux/bitops.h:6,
                 from /home/sfr/next/next/include/linux/kernel.h:23,
                 from /home/sfr/next/next/io_uring/nop.c:2:
/home/sfr/next/next/include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~

/home/sfr/next/next/include/linux/io_uring_types.h:538:35: note: in expansion of macro 'BIT'
538 | REQ_F_CAN_POLL = BIT(REQ_F_CAN_POLL_BIT),
| ^~~

(and mny more similar)

Introduced by commit

d964e8440442 ("io_uring: add io_file_can_poll() helper")

REQ_F_CAN_POLL_BIT is 32.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 15 lines · On Tue, 6 Feb 2024 13:10:50 +1100 Stephen Rothwell <[email protected]> wrote:

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

In file included from /home/sfr/next/next/include/linux/bits.h:6,

                 from /home/sfr/next/next/include/linux/bitops.h:6,
                 from /home/sfr/next/next/include/linux/kernel.h:23,
                 from /home/sfr/next/next/io_uring/nop.c:2:
/home/sfr/next/next/include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~

/home/sfr/next/next/include/linux/io_uring_types.h:538:35: note: in expansion of macro 'BIT'
538 | REQ_F_CAN_POLL = BIT(REQ_F_CAN_POLL_BIT),
| ^~~

Quoted 7 lines

(and mny more similar)

Introduced by commit

d964e8440442 ("io_uring: add io_file_can_poll() helper")

REQ_F_CAN_POLL_BIT is 32.

This became a build failure in the i386 defconfig build, so I reverted commit

efaf6760976d ("Merge branch 'for-6.9/io_uring' into for-next")

i.e. the merge of the whole topic branch.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
In reply to Stephen Rothwell
Quoted 14 lines · Stephen Rothwell

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

In file included from /home/sfr/next/next/include/linux/bits.h:6,

                 from /home/sfr/next/next/include/linux/bitops.h:6,
                 from /home/sfr/next/next/include/linux/kernel.h:23,
                 from /home/sfr/next/next/io_uring/nop.c:2:
/home/sfr/next/next/include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~

/home/sfr/next/next/include/linux/io_uring_types.h:538:35: note: in expansion of macro 'BIT'
538 | REQ_F_CAN_POLL = BIT(REQ_F_CAN_POLL_BIT),
| ^~~

Quoted 7 lines

(and mny more similar)

Introduced by commit

d964e8440442 ("io_uring: add io_file_can_poll() helper")

REQ_F_CAN_POLL_BIT is 32.

All of these BIT() have to be changed to BIT_ULL().
And let's hope all variables used for storing these flags have been changed from unsigned long to u64...

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#3 lore raw
Quoted 19 lines · Geert Uytterhoeven
Quoted 18 lines · Stephen Rothwell

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

In file included from /home/sfr/next/next/include/linux/bits.h:6,

                 from /home/sfr/next/next/include/linux/bitops.h:6,
                 from /home/sfr/next/next/include/linux/kernel.h:23,
                 from /home/sfr/next/next/io_uring/nop.c:2:
/home/sfr/next/next/include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~

/home/sfr/next/next/include/linux/io_uring_types.h:538:35: note: in expansion of macro 'BIT'
538 | REQ_F_CAN_POLL = BIT(REQ_F_CAN_POLL_BIT),
| ^~~

(and mny more similar)

Introduced by commit

Quoted 7 lines
Quoted 3 lines

d964e8440442 ("io_uring: add io_file_can_poll() helper")

REQ_F_CAN_POLL_BIT is 32.

All of these BIT() have to be changed to BIT_ULL().
And let's hope all variables used for storing these flags have been changed from unsigned long to u64...

I have sent a fix
https://lore.kernel.org/1960190f37b94276df50d382b9f1488cd6b6e662.1707226862.git.geert+renesas@glider.be

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#4 lore raw
Quoted 22 lines · Geert Uytterhoeven
Quoted 21 lines · Geert Uytterhoeven
Quoted 20 lines · Stephen Rothwell

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

In file included from /home/sfr/next/next/include/linux/bits.h:6,

                 from /home/sfr/next/next/include/linux/bitops.h:6,
                 from /home/sfr/next/next/include/linux/kernel.h:23,
                 from /home/sfr/next/next/io_uring/nop.c:2:
/home/sfr/next/next/include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~

/home/sfr/next/next/include/linux/io_uring_types.h:538:35: note: in expansion of macro 'BIT'
538 | REQ_F_CAN_POLL = BIT(REQ_F_CAN_POLL_BIT),
| ^~~

(and mny more similar)

Introduced by commit

d964e8440442 ("io_uring: add io_file_can_poll() helper")

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

REQ_F_CAN_POLL_BIT is 32.

All of these BIT() have to be changed to BIT_ULL().
And let's hope all variables used for storing these flags have been changed from unsigned long to u64...

I have sent a fix
https://lore.kernel.org/1960190f37b94276df50d382b9f1488cd6b6e662.1707226862.git.geert+renesas@glider.be

It needs a bit more than that, just because there's one helper that also returns flags to be set. I've sorted it out and amended the commit, should be fine now. I'll check on 32-bit as well.

Signature · 1 line
Jens Axboe
#5 lore raw
In reply to Stephen Rothwell
Quoted 16 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

In file included from /home/sfr/next/next/include/linux/bits.h:6,

                 from /home/sfr/next/next/include/linux/bitops.h:6,
                 from /home/sfr/next/next/include/linux/kernel.h:23,
                 from /home/sfr/next/next/io_uring/nop.c:2:
/home/sfr/next/next/include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~

/home/sfr/next/next/include/linux/io_uring_types.h:538:35: note: in expansion of macro 'BIT'
538 | REQ_F_CAN_POLL = BIT(REQ_F_CAN_POLL_BIT),
| ^~~

Quoted 7 lines

(and mny more similar)

Introduced by commit

d964e8440442 ("io_uring: add io_file_can_poll() helper")

REQ_F_CAN_POLL_BIT is 32.

Oops yes, didn't get around to 32-bit compiles just yet. I'll fix it up, thanks.

Signature · 1 line
Jens Axboe