]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
crypto: caam - remove redundant likely/unlikely annotation
authorChengguang Xu <cgxu519@gmx.com>
Wed, 20 Feb 2019 10:49:18 +0000 (18:49 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Feb 2019 06:17:59 +0000 (14:17 +0800)
unlikely has already included in IS_ERR(), so just
remove redundant likely/unlikely annotation.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/qi.c

index 7bce97884663608cc2c490456970324bc7f4b0d8..a15ce9213310558a6b4c7e22469499b05d9347e7 100644 (file)
@@ -782,7 +782,7 @@ static struct caam_drv_ctx *get_drv_ctx(struct caam_ctx *ctx,
 
                        cpu = smp_processor_id();
                        drv_ctx = caam_drv_ctx_init(ctx->qidev, &cpu, desc);
-                       if (likely(!IS_ERR_OR_NULL(drv_ctx)))
+                       if (!IS_ERR_OR_NULL(drv_ctx))
                                drv_ctx->op_type = type;
 
                        ctx->drv_ctx[type] = drv_ctx;
@@ -893,7 +893,7 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req,
        struct caam_drv_ctx *drv_ctx;
 
        drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT);
-       if (unlikely(IS_ERR_OR_NULL(drv_ctx)))
+       if (IS_ERR_OR_NULL(drv_ctx))
                return (struct aead_edesc *)drv_ctx;
 
        /* allocate space for base edesc and hw desc commands, link tables */
@@ -1191,7 +1191,7 @@ static struct skcipher_edesc *skcipher_edesc_alloc(struct skcipher_request *req,
        struct caam_drv_ctx *drv_ctx;
 
        drv_ctx = get_drv_ctx(ctx, encrypt ? ENCRYPT : DECRYPT);
-       if (unlikely(IS_ERR_OR_NULL(drv_ctx)))
+       if (IS_ERR_OR_NULL(drv_ctx))
                return (struct skcipher_edesc *)drv_ctx;
 
        src_nents = sg_nents_for_len(req->src, req->cryptlen);
index b84e6c8b1e138226ec4feebf66167738da6a10df..7cb8b1755e57b12acc81abf986ef60d3b1618d1b 100644 (file)
@@ -318,7 +318,7 @@ int caam_drv_ctx_update(struct caam_drv_ctx *drv_ctx, u32 *sh_desc)
        /* Create a new req FQ in parked state */
        new_fq = create_caam_req_fq(drv_ctx->qidev, drv_ctx->rsp_fq,
                                    drv_ctx->context_a, 0);
-       if (unlikely(IS_ERR_OR_NULL(new_fq))) {
+       if (IS_ERR_OR_NULL(new_fq)) {
                dev_err(qidev, "FQ allocation for shdesc update failed\n");
                return PTR_ERR(new_fq);
        }
@@ -431,7 +431,7 @@ struct caam_drv_ctx *caam_drv_ctx_init(struct device *qidev,
        /* Attach request FQ */
        drv_ctx->req_fq = create_caam_req_fq(qidev, drv_ctx->rsp_fq, hwdesc,
                                             QMAN_INITFQ_FLAG_SCHED);
-       if (unlikely(IS_ERR_OR_NULL(drv_ctx->req_fq))) {
+       if (IS_ERR_OR_NULL(drv_ctx->req_fq)) {
                dev_err(qidev, "create_caam_req_fq failed\n");
                dma_unmap_single(qidev, hwdesc, size, DMA_BIDIRECTIONAL);
                kfree(drv_ctx);