public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Geliang Tang <geliangtang@163.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-mapping: use offset_in_page macro
Date: Mon, 23 Nov 2015 13:22:35 +0000	[thread overview]
Message-ID: <20151123132234.GD2755@arm.com> (raw)
In-Reply-To: <67e50e90bcd2753e83be3edcbb8385c25343b30a.1448115135.git.geliangtang@163.com>

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
> 
> 

  reply	other threads:[~2015-11-23 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21 14:14 [PATCH] dma-mapping: use offset_in_page macro Geliang Tang
2015-11-23 13:22 ` Will Deacon [this message]
2015-11-23 14:46   ` Geliang Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151123132234.GD2755@arm.com \
    --to=will.deacon@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=borntraeger@de.ibm.com \
    --cc=geliangtang@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=ricardo.ribalda@gmail.com \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox