RE: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-16 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Monday, June 17, 2019 3:23 PM > > Hi Shimoda-san, > > On Mon, Jun 17, 2019 at 6:54 AM Yoshihiro Shimoda > wrote: > > > From: Geert Uytterhoeven, Sent: Friday, June 14, 2019 4:27 PM > > > On Fri, Jun 14, 2019 at 9:18 AM Christoph Hellwig wrote: > >

Re: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-16 Thread Geert Uytterhoeven
Hi Shimoda-san, On Mon, Jun 17, 2019 at 6:54 AM Yoshihiro Shimoda wrote: > > From: Geert Uytterhoeven, Sent: Friday, June 14, 2019 4:27 PM > > On Fri, Jun 14, 2019 at 9:18 AM Christoph Hellwig wrote: > > > On Thu, Jun 13, 2019 at 10:35:44PM +0200, Geert Uytterhoeven wrote: > > > > I'm always trig

RE: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-16 Thread Yoshihiro Shimoda
Hi Geert, Christoph, Thank you for your comments! > From: Geert Uytterhoeven, Sent: Friday, June 14, 2019 4:27 PM > > Hi Christoph, > > On Fri, Jun 14, 2019 at 9:18 AM Christoph Hellwig wrote: > > On Thu, Jun 13, 2019 at 10:35:44PM +0200, Geert Uytterhoeven wrote: > > > I'm always triggered by

RE: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-16 Thread Yoshihiro Shimoda
Hi Wolfram-san, > From: Wolfram Sang, Sent: Friday, June 14, 2019 4:46 AM > > On Thu, Jun 13, 2019 at 07:20:14PM +0900, Yoshihiro Shimoda wrote: > > Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()") > > provides a helper function to get the max mapping size, we can use > > t

Re: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-14 Thread Geert Uytterhoeven
Hi Christoph, On Fri, Jun 14, 2019 at 9:18 AM Christoph Hellwig wrote: > On Thu, Jun 13, 2019 at 10:35:44PM +0200, Geert Uytterhoeven wrote: > > I'm always triggered by the use of min_t() and other casts: > > mmc->max_blk_size and mmc->max_blk_count are both unsigned int. > > dma_max_mapping_size

Re: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-14 Thread Christoph Hellwig
On Thu, Jun 13, 2019 at 10:35:44PM +0200, Geert Uytterhoeven wrote: > I'm always triggered by the use of min_t() and other casts: > mmc->max_blk_size and mmc->max_blk_count are both unsigned int. > dma_max_mapping_size() returns size_t, which can be 64-bit. > > 1) Can the multiplication overflow?

Re: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-13 Thread Geert Uytterhoeven
Hi Shimoda-san, On Thu, Jun 13, 2019 at 5:37 PM Yoshihiro Shimoda wrote: > Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()") > provides a helper function to get the max mapping size, we can use > the function instead of the workaround code for swiotlb. > > Signed-off-by: Yos

Re: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-13 Thread Wolfram Sang
On Thu, Jun 13, 2019 at 07:20:14PM +0900, Yoshihiro Shimoda wrote: > Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()") > provides a helper function to get the max mapping size, we can use > the function instead of the workaround code for swiotlb. > > Signed-off-by: Yoshihiro

[RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-13 Thread Yoshihiro Shimoda
Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()") provides a helper function to get the max mapping size, we can use the function instead of the workaround code for swiotlb. Signed-off-by: Yoshihiro Shimoda --- drivers/mmc/host/tmio_mmc_core.c | 17 - 1 file