From patchwork Wed Jul 14 20:30:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 112090 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 o6EKUdhk012951 for ; Wed, 14 Jul 2010 20:30:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754365Ab0GNUaj (ORCPT ); Wed, 14 Jul 2010 16:30:39 -0400 Received: from sj-iport-5.cisco.com ([171.68.10.87]:39102 "EHLO sj-iport-5.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754039Ab0GNUai (ORCPT ); Wed, 14 Jul 2010 16:30:38 -0400 Authentication-Results: sj-iport-5.cisco.com; dkim=neutral (message not signed) header.i=none X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAGy7PUyrR7Hu/2dsb2JhbACfcXGmMZpchSQEg34 X-IronPort-AV: E=Sophos;i="4.55,203,1278288000"; d="scan'208";a="226310702" Received: from sj-core-5.cisco.com ([171.71.177.238]) by sj-iport-5.cisco.com with ESMTP; 14 Jul 2010 20:30:38 +0000 Received: from roland-alpha.cisco.com (roland-alpha.cisco.com [10.33.42.9]) by sj-core-5.cisco.com (8.13.8/8.14.3) with ESMTP id o6EKUc5K025190; Wed, 14 Jul 2010 20:30:38 GMT Received: by roland-alpha.cisco.com (Postfix, from userid 33217) id D95B01FDF3; Wed, 14 Jul 2010 13:30:34 -0700 (PDT) From: Roland Dreier To: Faisal Latif , Chien Tung , linux-rdma@vger.kernel.org Subject: [PATCH/RFC] RDMA/nes: Rewrite expression to avoid undefined semantics X-Message-Flag: Warning: May contain useful information Date: Wed, 14 Jul 2010 13:30:34 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 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]); Wed, 14 Jul 2010 20:30:39 +0000 (UTC) diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 57874a1..f41d890 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -1970,7 +1970,7 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic) dev_kfree_skb( nesvnic->nic.tx_skb[nesvnic->nic.sq_tail]); - nesvnic->nic.sq_tail = (++nesvnic->nic.sq_tail) + nesvnic->nic.sq_tail = (nesvnic->nic.sq_tail + 1) & (nesvnic->nic.sq_size - 1); }