From patchwork Fri Dec 20 20:26:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3391741 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 3DE409F344 for ; Fri, 20 Dec 2013 20:27:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77D2020703 for ; Fri, 20 Dec 2013 20:27:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D3C220704 for ; Fri, 20 Dec 2013 20:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207Ab3LTU1S (ORCPT ); Fri, 20 Dec 2013 15:27:18 -0500 Received: from mtv-iport-1.cisco.com ([173.36.130.12]:18425 "EHLO mtv-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088Ab3LTU1L (ORCPT ); Fri, 20 Dec 2013 15:27:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=841; q=dns/txt; s=iport; t=1387571231; x=1388780831; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=24hHUDhGB2XRnWkxmb62s/v3N+xSwHfZCBXF+YP6/xA=; b=Kqk6RJF/IEgk2n4KULVng9ytcelm1+Zr40+XP/SoU8yEV85deVs2FLJR CDImdNCyJc4wfBoGIi4xo2zelZWAxh+AuDh1PwJ8dgtsqxOGySNMTGIkv T96PtK3DCxF1FiOBaW+Pigz8iwMtUR9nM9W8b4TYTnTeUq9fWuJuiYGHK 8=; X-IronPort-AV: E=Sophos;i="4.95,523,1384300800"; d="scan'208";a="97830923" Received: from mtv-core-4.cisco.com ([171.68.58.9]) by mtv-iport-1.cisco.com with ESMTP; 20 Dec 2013 20:27:10 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id rBKKR9wN012863; Fri, 20 Dec 2013 20:27:10 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id EA4213F809; Fri, 20 Dec 2013 12:27:09 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org, roland@kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 11/15] IB/usnic: Remove extraneous if check Date: Fri, 20 Dec 2013 12:26:42 -0800 Message-Id: <1387571206-8043-12-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387571206-8043-1-git-send-email-umalhi@cisco.com> References: <1387571206-8043-1-git-send-email-umalhi@cisco.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=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Remove extraneous if (chunk->cnt) condition. The code will not go into the next for loop if chunk->cnt is 0. Signed-off-by: Upinder Malhi --- drivers/infiniband/hw/usnic/usnic_vnic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_vnic.c b/drivers/infiniband/hw/usnic/usnic_vnic.c index 5a50acb..74e4e5b 100644 --- a/drivers/infiniband/hw/usnic/usnic_vnic.c +++ b/drivers/infiniband/hw/usnic/usnic_vnic.c @@ -102,8 +102,6 @@ int usnic_vnic_dump(struct usnic_vnic *vnic, char *buf, spin_lock(&vnic->res_lock); for (i = 0; i < ARRAY_SIZE(vnic->chunks); i++) { chunk = &vnic->chunks[i]; - if (chunk->cnt == 0) - continue; for (j = 0; j < chunk->cnt; j++) { res = chunk->res[j]; offset += scnprintf(buf + offset, buf_sz - offset,