From: Akinobu Mita Date: Sat, 27 Oct 2012 15:49:33 +0000 (+0900) Subject: async_tx: use memchr_inv X-Git-Tag: v3.9-rc1~12^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c88ae90939c2ef8ae80b07713b898c577b81598;p=platform%2Fkernel%2Flinux-stable.git async_tx: use memchr_inv Use memchr_inv() to check the specified page is filled with zero. Signed-off-by: Akinobu Mita Cc: Vinod Koul Cc: Dan Williams Signed-off-by: Vinod Koul --- 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 *