lkml.org 
[lkml]   [2015]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dma-mapping: use offset_in_page macro
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
>
>


\
 
 \ /
  Last update: 2015-11-23 14:41    [W:0.130 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site