Commit 3564f5a2 authored by Herbert Xu's avatar Herbert Xu

crypto: chelsio - Fix flexible struct array warning

This patch fixes the sparse warning about arrays of flexible
structures by removing an unnecessary use of them in struct
__crypto_ctx.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 3112d0f1
...@@ -98,17 +98,17 @@ static int chcr_handle_cipher_resp(struct skcipher_request *req, ...@@ -98,17 +98,17 @@ static int chcr_handle_cipher_resp(struct skcipher_request *req,
static inline struct chcr_aead_ctx *AEAD_CTX(struct chcr_context *ctx) static inline struct chcr_aead_ctx *AEAD_CTX(struct chcr_context *ctx)
{ {
return ctx->crypto_ctx->aeadctx; return &ctx->crypto_ctx->aeadctx;
} }
static inline struct ablk_ctx *ABLK_CTX(struct chcr_context *ctx) static inline struct ablk_ctx *ABLK_CTX(struct chcr_context *ctx)
{ {
return ctx->crypto_ctx->ablkctx; return &ctx->crypto_ctx->ablkctx;
} }
static inline struct hmac_ctx *HMAC_CTX(struct chcr_context *ctx) static inline struct hmac_ctx *HMAC_CTX(struct chcr_context *ctx)
{ {
return ctx->crypto_ctx->hmacctx; return &ctx->crypto_ctx->hmacctx;
} }
static inline struct chcr_gcm_ctx *GCM_CTX(struct chcr_aead_ctx *gctx) static inline struct chcr_gcm_ctx *GCM_CTX(struct chcr_aead_ctx *gctx)
......
...@@ -248,9 +248,9 @@ struct hmac_ctx { ...@@ -248,9 +248,9 @@ struct hmac_ctx {
struct __crypto_ctx { struct __crypto_ctx {
union { union {
DECLARE_FLEX_ARRAY(struct hmac_ctx, hmacctx); struct hmac_ctx hmacctx;
DECLARE_FLEX_ARRAY(struct ablk_ctx, ablkctx); struct ablk_ctx ablkctx;
DECLARE_FLEX_ARRAY(struct chcr_aead_ctx, aeadctx); struct chcr_aead_ctx aeadctx;
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment