Skip to contentSkip to conversation

s390: crypto: aes_s390: Remove 'const' to avoid compiler warnings

PATCH Heiko Carstens 1 participant 1 message Jan 7, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Heiko Carstens

author Applied
#1 lore raw
Quoted 2 lines · Chen Gang

In aes_encrypt() and aes_decrypt(), need let 'sctx->key' be modified, so remove 'const' for it. The related warnings:

...

Quoted 20 lines
---
 arch/s390/crypto/aes_s390.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/crypto/aes_s390.c +1 -1
index 1f272b2..5566ce8 100644
@@ -134,7 +134,7 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
 
 static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 {
-	const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
+	struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
 
 	if (unlikely(need_fallback(sctx->key_len))) {
 		crypto_cipher_encrypt_one(sctx->fallback.cip, out, in);

arch/s390/crypto/aes_s390.c static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) · line 165

Quoted 8 lines
arch/s390/crypto/aes_s390.c +1 -1
@@ -159,7 +159,7 @@ static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 
 static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 {
-	const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
+	struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
 
 	if (unlikely(need_fallback(sctx->key_len))) {
 		crypto_cipher_decrypt_one(sctx->fallback.cip, out, in);

Applied, thanks.