mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
Drivers: hv: vmbus: Rework use of DMA_BIT_MASK(64)
Using DMA_BIT_MASK(64) as an initializer for a global variable
causes problems with Clang 12.0.1. The compiler doesn't understand
that value 64 is excluded from the shift at compile time, resulting
in a build error.
While this is a compiler problem, avoid the issue by setting up
the dma_mask memory as part of struct hv_device, and initialize
it using dma_set_mask().
Reported-by: Nathan Chancellor <nathan@kernel.org>
Reported-by: Vitaly Chikunov <vt@altlinux.org>
Reported-by: Jakub Kicinski <kuba@kernel.org>
Fixes: 743b237c3a ("scsi: storvsc: Add Isolation VM support for storvsc driver")
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/1644176216-12531-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
@@ -1262,6 +1262,7 @@ struct hv_device {
|
||||
struct vmbus_channel *channel;
|
||||
struct kset *channels_kset;
|
||||
struct device_dma_parameters dma_parms;
|
||||
u64 dma_mask;
|
||||
|
||||
/* place holder to keep track of the dir for hv device in debugfs */
|
||||
struct dentry *debug_dir;
|
||||
|
||||
Reference in New Issue
Block a user