diff mbox series

mhi: pci_generic: Fix implicit conversion warning

Message ID 1605781171-29093-1-git-send-email-loic.poulain@linaro.org
State Superseded
Headers show
Series mhi: pci_generic: Fix implicit conversion warning | expand

Commit Message

Loic Poulain Nov. 19, 2020, 10:19 a.m. UTC
Fix the following warning with explicit cast:

warning: implicit conversion from 'unsigned long long' to
'dma_addr_t' (aka 'unsigned int')
mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

Reported-by: kernel test robot <lkp@intel.com>
---
 drivers/bus/mhi/pci_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

Comments

Nathan Chancellor Nov. 19, 2020, 9:20 p.m. UTC | #1
On Thu, Nov 19, 2020 at 11:19:31AM +0100, Loic Poulain wrote:
> Fix the following warning with explicit cast:

> 

> warning: implicit conversion from 'unsigned long long' to

> 'dma_addr_t' (aka 'unsigned int')

> mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);

> 

> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

> Reported-by: kernel test robot <lkp@intel.com>


Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>


> ---

>  drivers/bus/mhi/pci_generic.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c

> index 17c6448..3337c6d 100644

> --- a/drivers/bus/mhi/pci_generic.c

> +++ b/drivers/bus/mhi/pci_generic.c

> @@ -411,7 +411,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)

>  	mhi_cntrl = &mhi_pdev->mhi_cntrl;

>  	mhi_cntrl->cntrl_dev = &pdev->dev;

>  	mhi_cntrl->iova_start = 0;

> -	mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);

> +	mhi_cntrl->iova_stop = (dma_addr_t)DMA_BIT_MASK(info->dma_data_width);

>  	mhi_cntrl->fw_image = info->fw;

>  	mhi_cntrl->edl_image = info->edl;

>  

> -- 

> 2.7.4

>
diff mbox series

Patch

diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
index 17c6448..3337c6d 100644
--- a/drivers/bus/mhi/pci_generic.c
+++ b/drivers/bus/mhi/pci_generic.c
@@ -411,7 +411,7 @@  static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	mhi_cntrl = &mhi_pdev->mhi_cntrl;
 	mhi_cntrl->cntrl_dev = &pdev->dev;
 	mhi_cntrl->iova_start = 0;
-	mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width);
+	mhi_cntrl->iova_stop = (dma_addr_t)DMA_BIT_MASK(info->dma_data_width);
 	mhi_cntrl->fw_image = info->fw;
 	mhi_cntrl->edl_image = info->edl;