Commit f24d4116 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman

staging: ccree: dma mask is type u64

The dma mask var was defined as dma_addr_t but should be
u64. This showed as a sparse warning when building for 32 bit.
Fix it by changing type to u64 and drop the cast.
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d5583d0
...@@ -156,7 +156,7 @@ static int init_cc_resources(struct platform_device *plat_dev) ...@@ -156,7 +156,7 @@ static int init_cc_resources(struct platform_device *plat_dev)
struct device *dev = &plat_dev->dev; struct device *dev = &plat_dev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
u32 signature_val; u32 signature_val;
dma_addr_t dma_mask; u64 dma_mask;
int rc = 0; int rc = 0;
new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL); new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL);
...@@ -205,7 +205,7 @@ static int init_cc_resources(struct platform_device *plat_dev) ...@@ -205,7 +205,7 @@ static int init_cc_resources(struct platform_device *plat_dev)
if (!plat_dev->dev.dma_mask) if (!plat_dev->dev.dma_mask)
plat_dev->dev.dma_mask = &plat_dev->dev.coherent_dma_mask; plat_dev->dev.dma_mask = &plat_dev->dev.coherent_dma_mask;
dma_mask = (dma_addr_t)(DMA_BIT_MASK(DMA_BIT_MASK_LEN)); dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN);
while (dma_mask > 0x7fffffffUL) { while (dma_mask > 0x7fffffffUL) {
if (dma_supported(&plat_dev->dev, dma_mask)) { if (dma_supported(&plat_dev->dev, dma_mask)) {
rc = dma_set_coherent_mask(&plat_dev->dev, dma_mask); rc = dma_set_coherent_mask(&plat_dev->dev, dma_mask);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment