Skip to contentSkip to conversation

crypto: s5p-sss - Use AES_BLOCK_SIZE define instead of number

PATCH In review Krzysztof Kozlowski 2 participants 2 messages Feb 19, 2019 – Feb 28, 2019

Subsystems (3)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

PATCH 1/1 crypto: s5p-sss - Use AES_BLOCK_SIZE define instead of number

Replace hard coded AES block size with define.

---
 drivers/crypto/s5p-sss.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/crypto/s5p-sss.c +4 -2
index 0064be0e3941..39fc6942364b 100644
@@ -1819,10 +1819,12 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
 	void __iomem *keystart;
 
 	if (iv)
-		memcpy_toio(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv, 0x10);
+		memcpy_toio(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv,
+			    AES_BLOCK_SIZE);
 
 	if (ctr)
-		memcpy_toio(dev->aes_ioaddr + SSS_REG_AES_CNT_DATA(0), ctr, 0x10);
+		memcpy_toio(dev->aes_ioaddr + SSS_REG_AES_CNT_DATA(0), ctr,
+			    AES_BLOCK_SIZE);
 
 	if (keylen == AES_KEYSIZE_256)
 		keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(0);
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 6 lines · Krzysztof Kozlowski

Replace hard coded AES block size with define.

---
 drivers/crypto/s5p-sss.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt