Skip to contentSkip to conversation

drivers/crypto/nx/nx-842.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE

PATCH In review Fabian Frederick 2 participants 2 messages Jun 14, 2014 – Jun 16, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/crypto/nx/nx-842.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE

use mm.h definition

Cc Nathan Fontenot <[email protected]>
Cc Marcelo Henrique Cerri <[email protected]>
---
 drivers/crypto/nx/nx-842.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/nx/nx-842.c +2 -2
index 502edf0..923c4b6 100644
@@ -350,7 +350,7 @@ int nx842_compress(const unsigned char *in, unsigned int inlen,
 	 * the alignment is guaranteed.
 	*/
 	inbuf = (unsigned long)in;
-	if (!IS_ALIGNED(inbuf, PAGE_SIZE) || inlen != PAGE_SIZE)
+	if (!PAGE_ALIGNED(inbuf) || inlen != PAGE_SIZE)
 		return -EINVAL;
 
 	rcu_read_lock();
@@ -545,7 +545,7 @@ int nx842_decompress(const unsigned char *in, unsigned int inlen,
 
 	/* Ensure page alignment and size */
 	outbuf = (unsigned long)out;
-	if (!IS_ALIGNED(outbuf, PAGE_SIZE) || *outlen != PAGE_SIZE)
+	if (!PAGE_ALIGNED(outbuf) || *outlen != PAGE_SIZE)
 		return -EINVAL;
 
 	rcu_read_lock();
Signature · 1 line
1.8.4.5
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Fabian Frederick

use mm.h definition

Cc Nathan Fontenot <[email protected]>
Cc Marcelo Henrique Cerri <[email protected]>
Quoted 27 lines
---
 drivers/crypto/nx/nx-842.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/nx/nx-842.c +2 -2
index 502edf0..923c4b6 100644
@@ -350,7 +350,7 @@ int nx842_compress(const unsigned char *in, unsigned int inlen,
 	 * the alignment is guaranteed.
 	*/
 	inbuf = (unsigned long)in;
-	if (!IS_ALIGNED(inbuf, PAGE_SIZE) || inlen != PAGE_SIZE)
+	if (!PAGE_ALIGNED(inbuf) || inlen != PAGE_SIZE)
 		return -EINVAL;
 
 	rcu_read_lock();
@@ -545,7 +545,7 @@ int nx842_decompress(const unsigned char *in, unsigned int inlen,
 
 	/* Ensure page alignment and size */
 	outbuf = (unsigned long)out;
-	if (!IS_ALIGNED(outbuf, PAGE_SIZE) || *outlen != PAGE_SIZE)
+	if (!PAGE_ALIGNED(outbuf) || *outlen != PAGE_SIZE)
 		return -EINVAL;
 
 	rcu_read_lock();