From patchwork Sat Jul 17 10:29:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 112535 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6HAUXfr008666 for ; Sat, 17 Jul 2010 10:30:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759860Ab0GQKaa (ORCPT ); Sat, 17 Jul 2010 06:30:30 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:48112 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759850Ab0GQKa2 (ORCPT ); Sat, 17 Jul 2010 06:30:28 -0400 Received: by wyb42 with SMTP id 42so2710196wyb.19 for ; Sat, 17 Jul 2010 03:30:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=H4keTpqnkR+AzLQ5l64WFX/9YNteEVIFhMV+EZ4Rn6Q=; b=Mynd8rDpAPgjCuUeUfH/tOwStpNBhrsKXt6hxnNbA6BDod17RhTwpkQMUKg1btgeAm 2Op0yc5iqVptq+QyyP0s95UsuDw0ZgMSqkEA/e6zquqEC3EXiLjzT+luGuFEIoRWxxQT 963K7XNbAb9Q/TJ+T2Da75D40jZJB8WvGaBsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=KNnmao/l7/Eh/7zGZheHXBlSnJHIa6Vq/3ASgOSxZ6osYsSUqDU6vBZmpYURPj7G0v 2VivtVgohdHvF5m1sB+72x6DEewfpLgc60RK2QMEfYXCJH5Bq2Lw5Zy9RBc514FPLqtQ qepdbQaLh6gDL9mlK5XqEi2baJDUEFJOwOeUw= Received: by 10.216.68.141 with SMTP id l13mr1700429wed.0.1279362627319; Sat, 17 Jul 2010 03:30:27 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id u32sm1177383weq.11.2010.07.17.03.30.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 17 Jul 2010 03:30:26 -0700 (PDT) Date: Sat, 17 Jul 2010 12:29:00 +0200 From: Dan Carpenter To: Steve Wise Cc: Roland Dreier , Sean Hefty , Hal Rosenstock , Frank Zago , linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] infiniband: cxgb3: fix signed bug Message-ID: <20100717102900.GG17585@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 17 Jul 2010 10:30:34 +0000 (UTC) diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index ae47bfd..e90fb2d 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c @@ -357,7 +357,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, struct iwch_qp *qhp; u32 idx; union t3_wr *wqe; - u32 num_wrs; + int num_wrs; unsigned long flag; struct t3_swsq *sqp; int wr_cnt = 1; @@ -535,7 +535,7 @@ int iwch_bind_mw(struct ib_qp *qp, union t3_wr *wqe; u32 pbl_addr; u8 page_size; - u32 num_wrs; + int num_wrs; unsigned long flag; struct ib_sge sgl; int err=0; @@ -554,7 +554,7 @@ int iwch_bind_mw(struct ib_qp *qp, } num_wrs = Q_FREECNT(qhp->wq.sq_rptr, qhp->wq.sq_wptr, qhp->wq.sq_size_log2); - if ((num_wrs) <= 0) { + if (num_wrs <= 0) { spin_unlock_irqrestore(&qhp->lock, flag); return -ENOMEM; }