From patchwork Fri Jun 16 06:16:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kashyap Desai X-Patchwork-Id: 13282011 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 303C0EB64D7 for ; Fri, 16 Jun 2023 06:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243227AbjFPGTI (ORCPT ); Fri, 16 Jun 2023 02:19:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243152AbjFPGTH (ORCPT ); Fri, 16 Jun 2023 02:19:07 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA552D60 for ; Thu, 15 Jun 2023 23:19:05 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-762303b2ca9so25143285a.1 for ; Thu, 15 Jun 2023 23:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686896344; x=1689488344; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ADAZeXd1bCxor2apdHpok/9BKnMqkYeexMs0bR4x5q0=; b=JQriUzsalqX5RjCOrec5EXvZXW3DHuIgJ05nH18x9ZuecbBP+vIl7XT6kPUaDqrFGy BH7jHLUUfxPHCjBCKxGGi/YKqpxP9RpfJ6vuUz16p6Lcx65EK7h9KSxyRK22BrU0nzsO jVK1uHh40uJJpdgxiKfijZ7QXw0EELZzt++so= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686896344; x=1689488344; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ADAZeXd1bCxor2apdHpok/9BKnMqkYeexMs0bR4x5q0=; b=TDeSBmx9nf2unviHXTCy0JSBu3UXVsxuztmICHkzhRtiJckvmNz4WfFRf0m6V0km5b pw5ldfr9g4iDCVM4qM2V4LcWkUZVYeZqWIzvXSuv1coXhc3+jawFEq6NPzYQFcyCA6zU 0UxTG1gqEtxN4soFy7Wcq+3sUB6VCCMwK8SkAlALlDcQETWzM3ckcN08flY/q3JVxFe2 RP/nlE5F1SUXJUQLnqSErHG4vr8fUqnmOwWKp2pOGhgs8kcM7TgiNB4CpIlA5zFkobGN K5FrX5wp1wsGbgNWv+QfFHCcuieFWK3VpDzXAnlE9qBIajnuQHy80p3e5ndQJYk15GTp 8Q1g== X-Gm-Message-State: AC+VfDwpWFhHPxpX04Y3h9mbMPBDIKw2apPn7+YRY6UzDvabmLGAm9XO 4AbRTT5X3C8+lj0Yc6l6meS793XGXfrxebHqCbfR/KuzoxleXTbG4WqjM9fsDUmLN7FYn0w2/8i /+REDKDIAo/TdJ0heldN8tl4Z5IclZLkHDwUoqdJV/9ihOdytwoFG4kTNi7rGL/4RYeCQtLxA0E eA1sfyZWBahO4= X-Google-Smtp-Source: ACHHUZ5GGCwQdkifEaLnad1NeDZKacgc/2xwxD75UPhbov/r8PfhwW95ugGN55hGvT0Sjvb9Y+guYg== X-Received: by 2002:a05:620a:27d2:b0:75b:23a1:3683 with SMTP id i18-20020a05620a27d200b0075b23a13683mr757262qkp.68.1686896343922; Thu, 15 Jun 2023 23:19:03 -0700 (PDT) Received: from amd_smc.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id c9-20020a62e809000000b0064d48d98260sm12878506pfi.156.2023.06.15.23.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 23:19:02 -0700 (PDT) From: Kashyap Desai To: linux-rdma@vger.kernel.org Cc: dan.carpenter@linaro.org, Kashyap Desai , Selvin Xavier Subject: [PATCH for-next 1/2] RDMA/bnxt_re: Remove incorrect return check from slow path Date: Fri, 16 Jun 2023 11:46:59 +0530 Message-Id: <20230616061700.741769-1-kashyap.desai@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The patch 691eb7c6110f: "RDMA/bnxt_re: handle command completions after driver detect a timedout" introduced code resulting in below warning issued by the smatch static checker. drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:513 __bnxt_qplib_rcfw_send_message() warn: duplicate check 'rc' (previous on line 506) Fix the warning by removing incorrect code block. Fixes: 691eb7c6110f ("RDMA/bnxt_re: handle command completions after driver detect a timedout") Reported-by: Dan Carpenter Signed-off-by: Kashyap Desai Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index bb5aebafe162..30c6e865d691 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -503,12 +503,6 @@ static int __bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw, rc = __wait_for_resp(rcfw, cookie); else rc = __poll_for_resp(rcfw, cookie); - if (rc) { - /* timed out */ - dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x timedout (%d)msec\n", - cookie, opcode, RCFW_CMD_WAIT_TIME_MS); - return rc; - } if (rc) { spin_lock_irqsave(&rcfw->cmdq.hwq.lock, flags);