From patchwork Thu Oct 24 09:01:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 3091121 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6831F9F2B7 for ; Thu, 24 Oct 2013 09:02:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DBA0204B0 for ; Thu, 24 Oct 2013 09:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F289204A2 for ; Thu, 24 Oct 2013 09:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037Ab3JXJCf (ORCPT ); Thu, 24 Oct 2013 05:02:35 -0400 Received: from mail-ea0-f175.google.com ([209.85.215.175]:49403 "EHLO mail-ea0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036Ab3JXJCe (ORCPT ); Thu, 24 Oct 2013 05:02:34 -0400 Received: by mail-ea0-f175.google.com with SMTP id l15so434468eak.6 for ; Thu, 24 Oct 2013 02:02:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LZ/kXoISWs51QVeCUvBBPywiMfrvX+hYRhJEhK+rqAM=; b=lk4oBeVhmEnKrGgLlD63dYm3jlF/DrCoHXR3dINEClpmwfRNi48vrIy8vj/TdFgtbY D/5ssx8ZEJfUBD7VJ9pkascnvJGTk1/HyL3z39pg8Yas2a2+izRDu9zYe0aPXeBijJV7 lkfLR7ZmbbuQo4/Ctb3PxoC+dCK0JCsb68qnYIvaFeAIXhoxCPlrGiRM+xOsssCGL8fq t2SdNhpz/VgVeLurVApBDq9/9FYRa8FT92YyjSMqM/TQpfs3sWUrAW698tt3z1Efbfkj dDQi2yCMkGl/Sa3tfP/voHLUHcoRXQ9RLNb0C7DGb3AtyqvRbjT3Wv5j4PUk/vzcTqM4 CLhQ== X-Gm-Message-State: ALoCoQm8zP4ycPcGWA0yvn56DyHXLjaW/OngtchPMkJZu8jrIZZYQRoVy6lNhHu/wZA64ga2QZmi X-Received: by 10.14.215.8 with SMTP id d8mr109252eep.144.1382605353818; Thu, 24 Oct 2013 02:02:33 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id j7sm1642918eeo.15.2013.10.24.02.02.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Oct 2013 02:02:33 -0700 (PDT) From: Eli Cohen To: roland@kernel.org Cc: linux-rdma@vger.kernel.org, amirv@mellanox.com, ogerlitz@mellanox.com, yevgenyp@mellanox.com, Eli Cohen Subject: [PATCH for-next 2/4] IB/mlx5: Remove "Always false" comparison Date: Thu, 24 Oct 2013 12:01:01 +0300 Message-Id: <1382605263-6822-3-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1382605263-6822-1-git-send-email-eli@mellanox.com> References: <1382605263-6822-1-git-send-email-eli@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP mlx5_cur and mlx5_new cannot have negative values so remove the redundant condition. Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index ce14008..2e4c465 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -1550,7 +1550,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, mlx5_cur = to_mlx5_state(cur_state); mlx5_new = to_mlx5_state(new_state); mlx5_st = to_mlx5_st(ibqp->qp_type); - if (mlx5_cur < 0 || mlx5_new < 0 || mlx5_st < 0) + if (mlx5_st < 0) goto out; optpar = ib_mask_to_mlx5_opt(attr_mask);