Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3427207imw; Mon, 11 Jul 2022 08:27:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tUFKJY2YoZqpfQwlkcvS96MJz48BkWCQamguANlqJrBPgsAAW/sD1EzrAKpWFttifySw6u X-Received: by 2002:a62:158a:0:b0:52a:c074:3e08 with SMTP id 132-20020a62158a000000b0052ac0743e08mr11007669pfv.16.1657553220165; Mon, 11 Jul 2022 08:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657553220; cv=none; d=google.com; s=arc-20160816; b=alBS1QTgfRKLEUjkIL2Fdhj7+HBFgF7KJs4DYNhiyJBGMSdMwEySUX9pQMTysnmWO/ +aLV4eujPxD+eqJhyRsIsGWdICHOClRnrUDwkUR96AHV8rLRcrx6EoE6qNG8u2x+rRDv YhTL4Y+r/0TRyqZPQLJg209pNdBhjAPakJ/8/stluHkkFj5dfwC08LiDQhTjjyXYh60G 95D8SjaHyURhxm/4ClGS32XBJYpqhSamjND7mKIkTIlwUb2JhZAQ6Fdaywc+nEbBSh0l WxFyOB56dF5TSMJZpjWsb9EIVUe23oMj3A4qNRtXgztQI5iEp9JgIYfPhGrJbP89J4QO Z4mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jogBlFUlepqL7JzSgVmKbdlPDl74gnxJZdBwj8ylcrA=; b=euSsOXSSttGPlhXgXFYxMhKq9Iepy2Fv9eaNMt1iRaY+1lWCfQ0rrruvN/CIMvI1OZ v/BFkSJKaW0i0DCb09MqQykzCsX96//U8JWOIHc+G+sEKOaaZQ5hpA7lxsRoz/Fxmnv8 Zis9HY9E7RJ608f/CExYKGRhwh7crQcYmJrv4FUETUaizWiHGZnhslTClXCNwDknZNAx JC5uzMw92SXlRLQ1BZNFq5r2zAUui16maop3Lcv5MIplc2tElrjdbsFBQTjSkXhriMxF kzzy3+Wivrn/jl/lYIV/nDM//o7bkm2TLIXUUlAudXWP8QeZDgUQ6SosbfipNU6QCQ66 3AJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a17090aad8800b001ef86b58c00si12351046pjq.146.2022.07.11.08.26.48; Mon, 11 Jul 2022 08:27:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232220AbiGKPNB (ORCPT + 99 others); Mon, 11 Jul 2022 11:13:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbiGKPM7 (ORCPT ); Mon, 11 Jul 2022 11:12:59 -0400 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 816F574E1E; Mon, 11 Jul 2022 08:12:58 -0700 (PDT) Received: from andrey-lpc.intra.ispras.ru (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPS id C568D40737D8; Mon, 11 Jul 2022 15:12:56 +0000 (UTC) From: Andrey Strachuk To: Bernard Metzler Cc: Andrey Strachuk , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH] RDMA: remove useless condition in siw_create_cq() Date: Mon, 11 Jul 2022 18:12:51 +0300 Message-Id: <20220711151251.17089-1-strochuk@ispras.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Comparison of 'cq' with NULL is useless since 'cq' is a result of container_of and cannot be NULL in any reasonable scenario. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") --- drivers/infiniband/sw/siw/siw_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c index 09316072b789..8dedae7ae79e 100644 --- a/drivers/infiniband/sw/siw/siw_verbs.c +++ b/drivers/infiniband/sw/siw/siw_verbs.c @@ -1167,7 +1167,7 @@ int siw_create_cq(struct ib_cq *base_cq, const struct ib_cq_init_attr *attr, err_out: siw_dbg(base_cq->device, "CQ creation failed: %d", rv); - if (cq && cq->queue) { + if (cq->queue) { struct siw_ucontext *ctx = rdma_udata_to_drv_context(udata, struct siw_ucontext, base_ucontext); -- 2.25.1