Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2720067pxv; Sun, 25 Jul 2021 03:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKlvo4k3mQ+TGV+rcemD1RHJNi87Ag31VY1/yRnmTMup7XWwbmPzi35pormbjHvuQWIMSl X-Received: by 2002:a6b:7114:: with SMTP id q20mr10577690iog.71.1627208680316; Sun, 25 Jul 2021 03:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627208680; cv=none; d=google.com; s=arc-20160816; b=V7RWsMvlvBNcgdrB2cGDk4kge/VRZDPauPMZ0wF9srrSAeCWHZf+YwRUBjnnOXjXIt AhfcGtOAGA+v7v/Wqt4aOWxhjMUzFDXnwv7uqH849dYhS091kswVMo9gK3ewBJU75PoC PbGUDIoWBV9EtjWaiDrgGpiWGrqVmNPHAV+3RKYT1joXHLJCNPdJ0UgDVDmLNdU28U7F GUJcfqX9BSvF55kv8uoyy1EEmkYVUDpN/J0Fjufbs8U82m4kMCbZW2AolI/Oo25Q/NwB L9WsgkDOiX4Z2y1y7gjU8ay3mGIYI/THuoQlLpXcsf6fMBDCthIUaUMvloH6ueGCthbh 6U7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OSltgi8BDaxiEDRHrgdP2Se441Ui0pDsY0dpSfykWaE=; b=0L78EdsP+L4Of6xfE09kslYljUwVDOJ6LZ+I3PcdmsHehQ4JUq8+EBWCsckQ8n4V5C 3va5ao68phlEhzdKN6/iShQ13XUkXlOAvT6p9xQTHAxSTlJoEi1swQlO5/ZtwD9FWly7 wn61BuBFpaZcASJM7KRW49sDs0T+prFzyXI3MvPAAI1T6aSidAEt+7WYm7yKRB5xCIkz yMl9NwuxByb78ugb0aHvLqzUyNwFIa3bvkuCWq6ekouiYQ+5im1BmiQ8vaqRXh2lHuQc rJpG4zzX6buge/LtO6kLzzI1W+NIhSBVeZtaX//5AAFujPinCaHdSP3YTDNdvogOz4zV 8ogw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pJnXAZhV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si15202753iop.0.2021.07.25.03.24.14; Sun, 25 Jul 2021 03:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pJnXAZhV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbhGYJmI (ORCPT + 99 others); Sun, 25 Jul 2021 05:42:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:37888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbhGYJmH (ORCPT ); Sun, 25 Jul 2021 05:42:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A470606A5; Sun, 25 Jul 2021 10:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627208558; bh=b9Q32uaI92A0JWOV2A5Hxm/bAl66EgVzXiqYx1br78g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pJnXAZhVKz4ukcc6om8a5MbzQAM5AkLIxmBYFmwz+7ZKOKh8g6+s3Dp9un4FvmaDX 7R45pQ2qstMTIJZKTLJNl+JugEOCYKuZGB81BXlLNUwgDnEX1jVDLLPB7qVqQSeozu 8U1mjwkYTA8zn5Lhc7VKtc4GMkFA3IfiX7xyzTfqUYUGtiH9uJci8NiEKOjL/dIElI HafcMj5WJY+kYZeY13GrmRerbzWEks7OjrZTBIfyXxoNLN4N88VWpranYTfl+kEGiT GwNyKQY7Wbti472hYBiLRFMDl9v5xGC1UZ26YVS64QAXEMsthZHbgOkJ9rj5j/JBOk +Oxqg/SP8nIyw== Date: Sun, 25 Jul 2021 13:22:34 +0300 From: Leon Romanovsky To: Jiapeng Chong Cc: mustafa.ismail@intel.com, shiraz.saleem@intel.com, dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] RDMA/irdma: Fix missing error code in irdma_modify_qp_roce() Message-ID: References: <1627036373-69929-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1627036373-69929-1-git-send-email-jiapeng.chong@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 23, 2021 at 06:32:53PM +0800, Jiapeng Chong wrote: > From: chongjiapeng > > The error code is missing in this code scenario, add the error code > '-EINVAL' to the return value 'ret'. > > Eliminate the follow smatch warning: > > drivers/infiniband/hw/irdma/verbs.c:1344 irdma_modify_qp_roce() warn: > missing error code 'ret'. > > Reported-by: Abaci Robot > Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") > Signed-off-by: chongjiapeng > --- > drivers/infiniband/hw/irdma/verbs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c > index 717147e..406c8b05 100644 > --- a/drivers/infiniband/hw/irdma/verbs.c > +++ b/drivers/infiniband/hw/irdma/verbs.c > @@ -1341,6 +1341,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr, > break; > case IB_QPS_SQD: > if (iwqp->iwarp_state == IRDMA_QP_STATE_SQD) > + ret = -EINVAL; > goto exit; You are missing brackets, it can't compile. > > if (iwqp->iwarp_state != IRDMA_QP_STATE_RTS) { > -- > 1.8.3.1 >