* hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type
@ 2022-02-03 23:58 Vitaly Chikunov
2022-02-04 9:33 ` Vitaly Kuznetsov
0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Chikunov @ 2022-02-03 23:58 UTC (permalink / raw)
To: linux-hyperv, Tianyu Lan, Michael Kelley, Long Li, Wei Liu
Hi,
There is new compilation error (for a second week for drm-tip[1] kernel):
CC [M] drivers/hv/vmbus_drv.o
drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
static u64 vmbus_dma_mask = DMA_BIT_MASK(64);
^~~~~~~~~~~~~~~~
./include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 error generated.
I understand this looks like possible GCC (11.2.1) bug, but still it prevents
building kernel with CONFIG_HYPERV.
Thanks,
[1] git://anongit.freedesktop.org/drm-tip
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type
2022-02-03 23:58 hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type Vitaly Chikunov
@ 2022-02-04 9:33 ` Vitaly Kuznetsov
0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Kuznetsov @ 2022-02-04 9:33 UTC (permalink / raw)
To: Vitaly Chikunov
Cc: linux-hyperv, Tianyu Lan, Michael Kelley, Long Li, Wei Liu
Vitaly Chikunov <vt@altlinux.org> writes:
> Hi,
>
> There is new compilation error (for a second week for drm-tip[1] kernel):
>
> CC [M] drivers/hv/vmbus_drv.o
> drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
> static u64 vmbus_dma_mask = DMA_BIT_MASK(64);
> ^~~~~~~~~~~~~~~~
> ./include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
> #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
> ^ ~~~
> 1 error generated.
>
> I understand this looks like possible GCC (11.2.1) bug, but still it prevents
> building kernel with CONFIG_HYPERV.
It seems DMA_BIT_MASK(64) is very common:
$ git grep DMA_BIT_MASK\(64\) | wc -l
230
Is Hyper-V vmbus_drv the only victim? What happens if you replace
'DMA_BIT_MASK(64)' with '~0ULL', does the rest of the drivers compile
normally?
--
Vitaly
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-04 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 23:58 hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type Vitaly Chikunov
2022-02-04 9:33 ` Vitaly Kuznetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).