diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2018-01-09 05:24:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 10:02:18 -0500 |
commit | f24d41169af2c71e461bda74af8fb36349621b59 (patch) | |
tree | 1ca619126ad4de4391b8d62fc689e37c8837ed84 | |
parent | 5d5583d0e22279d1a8fe1372ec0d02da5f289116 (diff) |
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: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/ccree/cc_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/ccree/cc_driver.c b/drivers/staging/ccree/cc_driver.c index b49bc25a2d55..6682d9d93931 100644 --- a/drivers/staging/ccree/cc_driver.c +++ b/drivers/staging/ccree/cc_driver.c | |||
@@ -156,7 +156,7 @@ static int init_cc_resources(struct platform_device *plat_dev) | |||
156 | struct device *dev = &plat_dev->dev; | 156 | struct device *dev = &plat_dev->dev; |
157 | struct device_node *np = dev->of_node; | 157 | struct device_node *np = dev->of_node; |
158 | u32 signature_val; | 158 | u32 signature_val; |
159 | dma_addr_t dma_mask; | 159 | u64 dma_mask; |
160 | int rc = 0; | 160 | int rc = 0; |
161 | 161 | ||
162 | new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL); | 162 | 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 | if (!plat_dev->dev.dma_mask) | 205 | if (!plat_dev->dev.dma_mask) |
206 | plat_dev->dev.dma_mask = &plat_dev->dev.coherent_dma_mask; | 206 | plat_dev->dev.dma_mask = &plat_dev->dev.coherent_dma_mask; |
207 | 207 | ||
208 | dma_mask = (dma_addr_t)(DMA_BIT_MASK(DMA_BIT_MASK_LEN)); | 208 | dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN); |
209 | while (dma_mask > 0x7fffffffUL) { | 209 | while (dma_mask > 0x7fffffffUL) { |
210 | if (dma_supported(&plat_dev->dev, dma_mask)) { | 210 | if (dma_supported(&plat_dev->dev, dma_mask)) { |
211 | rc = dma_set_coherent_mask(&plat_dev->dev, dma_mask); | 211 | rc = dma_set_coherent_mask(&plat_dev->dev, dma_mask); |