mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@infradead.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: vinod.koul@intel.com, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, Dan Williams <djbw@fb.com>
Subject: Re: [PATCH] async_tx: use memchr_inv
Date: Mon, 29 Oct 2012 10:23:43 +0530	[thread overview]
Message-ID: <1351486423.7077.31.camel@vkoul-udesk3> (raw)
In-Reply-To: <1351352973-3719-4-git-send-email-akinobu.mita@gmail.com>

On Sun, 2012-10-28 at 00:49 +0900, Akinobu Mita wrote:
> Use memchr_inv() to check the specified page is filled with zero.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> Cc: Dan Williams <djbw@fb.com>
> ---
Looks fine to me, need Dan;s ack before applying

>  crypto/async_tx/async_xor.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
> index 154cc84..8ade0a0 100644
> --- a/crypto/async_tx/async_xor.c
> +++ b/crypto/async_tx/async_xor.c
> @@ -230,9 +230,7 @@ EXPORT_SYMBOL_GPL(async_xor);
>  
>  static int page_is_zero(struct page *p, unsigned int offset, size_t len)
>  {
> -	char *a = page_address(p) + offset;
> -	return ((*(u32 *) a) == 0 &&
> -		memcmp(a, a + 4, len - 4) == 0);
> +	return !memchr_inv(page_address(p) + offset, 0, len);
>  }
>  
>  static inline struct dma_chan *


-- 
Vinod Koul
Intel Corp.


  reply	other threads:[~2012-10-29  5:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27 15:49 [PATCH] dma: ste_dma40: use for_each_set_bit Akinobu Mita
2012-10-27 15:49 ` [PATCH] dma: amba-pl08x: use vchan_dma_desc_free_list Akinobu Mita
2012-10-29  5:53   ` Vinod Koul
2012-10-27 15:49 ` [PATCH] dmatest: adjust invalid module parameters for number of source buffers Akinobu Mita
2012-10-29  5:54   ` Vinod Koul
2012-10-27 15:49 ` [PATCH] async_tx: use memchr_inv Akinobu Mita
2012-10-29  4:53   ` Vinod Koul [this message]
2012-10-30  3:49   ` Vinod Koul
2012-10-28 19:06 ` [PATCH] dma: ste_dma40: use for_each_set_bit Linus Walleij

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=1351486423.7077.31.camel@vkoul-udesk3 \
    --to=vkoul@infradead.org \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=djbw@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.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

all inboxes | Powered by JetHome®