Re: [PATCH] s390: crypto: aes_s390: Remove 'const' to avoid compiler warnings
From: Heiko Carstens
Date: Wed Jan 07 2015 - 03:24:36 EST
On Thu, Jan 01, 2015 at 10:56:02PM +0800, Chen Gang wrote:
> In aes_encrypt() and aes_decrypt(), need let 'sctx->key' be modified,
> so remove 'const' for it. The related warnings:
...
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
> ---
> arch/s390/crypto/aes_s390.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
> index 1f272b2..5566ce8 100644
> --- a/arch/s390/crypto/aes_s390.c
> +++ b/arch/s390/crypto/aes_s390.c
> @@ -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);
> @@ -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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/