Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1274662 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-11-21 15:20 +0100 |
| Last post | 2015-11-23 15:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] dma-mapping: use offset_in_page macro Geliang Tang <geliangtang@163.com> - 2015-11-21 15:20 +0100
Re: [PATCH] dma-mapping: use offset_in_page macro Will Deacon <will.deacon@arm.com> - 2015-11-23 14:30 +0100
Re: [PATCH] dma-mapping: use offset_in_page macro Geliang Tang <geliangtang@163.com> - 2015-11-23 15:50 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-11-21 15:20 +0100 |
| Subject | [PATCH] dma-mapping: use offset_in_page macro |
| Message-ID | <qxhbb-6pV-1@gated-at.bofh.it> |
Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang <geliangtang@163.com> --- include/linux/dma-mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 3293f27..c0b27ff 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -131,10 +131,10 @@ static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr, kmemcheck_mark_initialized(ptr, size); BUG_ON(!valid_dma_direction(dir)); addr = ops->map_page(dev, virt_to_page(ptr), - (unsigned long)ptr & ~PAGE_MASK, size, + offset_in_page(ptr), size, dir, attrs); debug_dma_map_page(dev, virt_to_page(ptr), - (unsigned long)ptr & ~PAGE_MASK, size, + offset_in_page(ptr), size, dir, addr, true); return addr; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2015-11-23 14:30 +0100 |
| Message-ID | <qxZlW-2hK-65@gated-at.bofh.it> |
| In reply to | #1274662 |
On Sat, Nov 21, 2015 at 10:14:44PM +0800, Geliang Tang wrote: > Use offset_in_page macro instead of (addr & ~PAGE_MASK). > > Signed-off-by: Geliang Tang <geliangtang@163.com> > --- > include/linux/dma-mapping.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I don't know which tree you're aiming at, but: Acked-by: Will Deacon <will.deacon@arm.com> Will > diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h > index 3293f27..c0b27ff 100644 > --- a/include/linux/dma-mapping.h > +++ b/include/linux/dma-mapping.h > @@ -131,10 +131,10 @@ static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr, > kmemcheck_mark_initialized(ptr, size); > BUG_ON(!valid_dma_direction(dir)); > addr = ops->map_page(dev, virt_to_page(ptr), > - (unsigned long)ptr & ~PAGE_MASK, size, > + offset_in_page(ptr), size, > dir, attrs); > debug_dma_map_page(dev, virt_to_page(ptr), > - (unsigned long)ptr & ~PAGE_MASK, size, > + offset_in_page(ptr), size, > dir, addr, true); > return addr; > } > -- > 2.5.0 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-11-23 15:50 +0100 |
| Message-ID | <qy0Bk-35s-29@gated-at.bofh.it> |
| In reply to | #1275385 |
On Mon, Nov 23, 2015 at 01:22:35PM +0000, Will Deacon wrote: > On Sat, Nov 21, 2015 at 10:14:44PM +0800, Geliang Tang wrote: > > Use offset_in_page macro instead of (addr & ~PAGE_MASK). > > > > Signed-off-by: Geliang Tang <geliangtang@163.com> > > --- > > include/linux/dma-mapping.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > I don't know which tree you're aiming at, but: > > Acked-by: Will Deacon <will.deacon@arm.com> > Thanks for your review. This patch is against linux-next tree. - Geliang Tang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web