]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: acomp - Remove acomp request flags
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 27 Feb 2025 10:14:57 +0000 (18:14 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 8 Mar 2025 08:23:22 +0000 (16:23 +0800)
The acomp request flags field duplicates the base request flags
and is confusing.  Remove it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/acompress.c
include/crypto/acompress.h

index 6fdf0ff9f3c0f61a842014e3b450a34a0756b723..30176316140ad2b314097e40e163d96457565e9b 100644 (file)
@@ -144,7 +144,7 @@ void acomp_request_free(struct acomp_req *req)
        if (tfm->__crt_alg->cra_type != &crypto_acomp_type)
                crypto_acomp_scomp_free_ctx(req);
 
-       if (req->flags & CRYPTO_ACOMP_ALLOC_OUTPUT) {
+       if (req->base.flags & CRYPTO_ACOMP_ALLOC_OUTPUT) {
                acomp->dst_free(req->dst);
                req->dst = NULL;
        }
index 54937b615239f746ae30a804c9d1dd2bf9323c43..b6d5136e689d2299b802ba70cf7314ee08b53d36 100644 (file)
@@ -24,7 +24,6 @@
  * @dst:       Destination data
  * @slen:      Size of the input buffer
  * @dlen:      Size of the output buffer and number of bytes produced
- * @flags:     Internal flags
  * @__ctx:     Start of private context data
  */
 struct acomp_req {
@@ -33,7 +32,6 @@ struct acomp_req {
        struct scatterlist *dst;
        unsigned int slen;
        unsigned int dlen;
-       u32 flags;
        void *__ctx[] CRYPTO_MINALIGN_ATTR;
 };
 
@@ -232,9 +230,9 @@ static inline void acomp_request_set_params(struct acomp_req *req,
        req->slen = slen;
        req->dlen = dlen;
 
-       req->flags &= ~CRYPTO_ACOMP_ALLOC_OUTPUT;
+       req->base.flags &= ~CRYPTO_ACOMP_ALLOC_OUTPUT;
        if (!req->dst)
-               req->flags |= CRYPTO_ACOMP_ALLOC_OUTPUT;
+               req->base.flags |= CRYPTO_ACOMP_ALLOC_OUTPUT;
 }
 
 /**