crypto: s5p-sss - Use AES_BLOCK_SIZE define instead of number
authorKrzysztof Kozlowski <krzk@kernel.org>
Tue, 19 Feb 2019 12:01:03 +0000 (13:01 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Feb 2019 06:17:58 +0000 (14:17 +0800)
Replace hard coded AES block size with define.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/s5p-sss.c

index 0064be0e3941b3fe741241705a24d0ee521193e3..39fc6942364be7e8db84a9b1f62c0dbf92a29605 100644 (file)
@@ -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);