Re: [PATCH] staging: mt7621-mmc: Fix calculation typo in msdc_init_gpd_bd

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

 



On Wed, Apr 25 2018, Christian Lütke-Stetzkamp wrote:

> When refactoring the function msdc_init_gpd_bd, an error in the
> calculation of the bd.next address was introduced. The offset has to
> be added to the base address, not multiplied.
>
> Fixes: 8f2395586cf0 ("staging: mt7621-mmc: Refactor msdc_init_gpd_bd")
> Reported-by: NeilBrown <neil@xxxxxxxxxx>

Now ...
Reported-and-tested-by: NeilBrown <neil@xxxxxxxxxx>

Thanks,
NeilBrown


> Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx>
> ---
>  drivers/staging/mt7621-mmc/sd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
> index ae70f9d0b346..a003f8324088 100644
> --- a/drivers/staging/mt7621-mmc/sd.c
> +++ b/drivers/staging/mt7621-mmc/sd.c
> @@ -2505,7 +2505,7 @@ static void msdc_init_gpd_bd(struct msdc_host *host, struct msdc_dma *dma)
>  
>  	memset(bd, 0, sizeof(struct bd) * MAX_BD_NUM);
>  	for (i = 0; i < (MAX_BD_NUM - 1); i++)
> -		bd[i].next = (void *)(dma->bd_addr * sizeof(*bd) * (i + 1));
> +		bd[i].next = (void *)(dma->bd_addr + sizeof(*bd) * (i + 1));
>  }
>  
>  static int msdc_drv_probe(struct platform_device *pdev)
> -- 
> 2.16.1

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux