Re: hv: drivers/hv/vmbus_drv.c:2082:29: error: shift count >= width of type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vitaly Chikunov <vt@xxxxxxxxxxxx> 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux