Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c88ae90 authored by Akinobu Mita's avatar Akinobu Mita Committed by Vinod Koul
Browse files

async_tx: use memchr_inv



Use memchr_inv() to check the specified page is filled with zero.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent 1ba151cd
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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 *