Received: by 10.223.185.116 with SMTP id b49csp823550wrg; Sat, 3 Mar 2018 08:16:28 -0800 (PST) X-Google-Smtp-Source: AG47ELtlU3BOtLfr8C9MQCdMaqVXHH0MRqbIZZgSRKkGnf0BFVVZJS7qPL036KLiIKVB+hLHACWV X-Received: by 10.101.64.139 with SMTP id t11mr7546516pgp.304.1520093787949; Sat, 03 Mar 2018 08:16:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520093787; cv=none; d=google.com; s=arc-20160816; b=eMrDhCaIvF39klD6mLTDjBfQlKMv3x70f7um/4CZa/58tK5jJ5lrDjs8MbDC/ea78I OSHlUJBcnp4ZZKvKWipOmUifdhojgjiDG8fRWU1Wovk0wjAhLy4tORnYeZCUQMm8mJKn R3nwnzgWccMrevX9YqovIo4jxUzCBnSiMWyV1DS1a7F/9hasgVeiMIgnb+6/wlBlkPah rLsIcuism1sP8qTcgzAWXD4BWTZVk77uGpxH+Ma1MdKnotWtUYFNx3kv69to8IsKQt2L kFjIz0NcWYGCbP0CL1l1HjALUyNgVMg/rQ7jIjBPdxh/M7n52KXVw2eCNb64/alT7zGv 4P0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=t0HQ6YV8ds8Vb/vE8TqiZEc8+xTnMGLxddhz3oyjnk8=; b=SAe4h8FMoOoRJm1WYt+HVz5R9OH42//oFoH/k6HHO5JdpzZCxo7aDJI7S8GJvju77K 0E7N466Cj9n29Te/S8JTVwpVgEUfKq7b6eXNWRyT/FGXTBd+GdI1jT2V+NecEgebmR+c sJebzTfQXclcZhnmaecwRcabZ+jM5EbIWPEPjYvfQGpdLHL7Hf0eVa47v4kSG1YQmK0K kmyuNMDouQ7tDKWsIXotZoqvuZmY9OPiz888jFvc7BNL/3eck/yfDuBMjzWRVOkzBiHT 8nCRSG8ToC7UDJhrpXc/i0M28Vg1CV2Qj7YarjIeWYzOCypmGcYpT+5sqFZWchayyhO4 YtXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DozxbTrQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w31-v6si6515277pla.315.2018.03.03.08.16.13; Sat, 03 Mar 2018 08:16:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DozxbTrQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932139AbeCCQPY (ORCPT + 99 others); Sat, 3 Mar 2018 11:15:24 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36947 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932088AbeCCQPX (ORCPT ); Sat, 3 Mar 2018 11:15:23 -0500 Received: by mail-pf0-f195.google.com with SMTP id h11so4940044pfn.4; Sat, 03 Mar 2018 08:15:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=t0HQ6YV8ds8Vb/vE8TqiZEc8+xTnMGLxddhz3oyjnk8=; b=DozxbTrQfvfjy8J+M/9PXylcKAE6FC5DIe09IyBv2ltoYHglyzMciE9Fk8rXX5RoHk ZoG/7+VJylqXBMZGaVvsEKsMagCSVCVnm5LjeOivsr7pr6yiOQRnSRbxQRusumSYhe3c iO0kKVNiDrqkmS+7v9UzVezWdfS604Nr5l3EDpoTm2Q7GmGTQUDVUycWe/6i9vADInja SOQh17TBMT+o1oFd9UYJdAwbpnBNd8l9R+rim8mrTu89tNoxDQbX/+JuU3d8een2TLM9 1JuHz5DrmqB/+ctfkwqgizy2BXiryNSAf6AzDBt7TohQRvlQdnuyW/11hsmhX7OA4YG6 ZjGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=t0HQ6YV8ds8Vb/vE8TqiZEc8+xTnMGLxddhz3oyjnk8=; b=CgRFiw6xTx9bZtIW1nd3PMT9tcrmQA4HW1hi2CcOs/LBPScswWGAgb2EhypXNkLIEs 2sjECLPem2jZGfQInjkPb1SujdMdjTA++76vQt0xM4wzil9/DNklzTkWXk6wsCq/2Nrp VejN0cMvKPc/Cf7XCj/2Ake4VtbEIktU/6sQl7racEJ/NBCqN/UpLTP1B0CO1Iqp70Ga mvcclhH1zLrb7nvR5j1Hv6XyX2bbCjbvZgsQTcpb/QW/iaBG9eRZMIgs/1Ju8ui8su2O TXgosSLL6n1DkLLzMzXh+Kb7qBPtqe2OFV81BcKqoBI8HzuTjGEfKeaLHSSkWkNsJDPB EqRQ== X-Gm-Message-State: APf1xPDCluhzPO9ZRCrakeYRG+P8h65WW91SQM15OsbpgI5Ab/2ab1aQ yC7zRkvfmm855c3q0kBo4x7Ewg== X-Received: by 10.98.152.205 with SMTP id d74mr9582728pfk.115.1520093722321; Sat, 03 Mar 2018 08:15:22 -0800 (PST) Received: from seema-Inspiron-15-3567 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id 9sm18888066pfq.63.2018.03.03.08.15.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Mar 2018 08:15:21 -0800 (PST) Date: Sat, 3 Mar 2018 21:44:56 +0530 From: Arushi Singhal To: jdmason@kudzu.us Cc: Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, oss-drivers@netronome.com, outreachy-kernel@googlegroups.com Subject: [PATCH v2] net: ethernet: Drop unnecessary continue Message-ID: <20180303161456.GA20194@seema-Inspiron-15-3567> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Continue at the bottom of a loop are removed. Issue found using drop_continue.cocci Coccinelle script. Signed-off-by: Arushi Singhal --- Changes in v2: - Braces is dropped from if with single statement. drivers/net/ethernet/amd/ni65.c | 4 +--- drivers/net/ethernet/neterion/s2io.c | 4 +--- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/amd/ni65.c b/drivers/net/ethernet/amd/ni65.c index e248d1a..8931ce6 100644 --- a/drivers/net/ethernet/amd/ni65.c +++ b/drivers/net/ethernet/amd/ni65.c @@ -435,10 +435,8 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr) } if(cards[i].vendor_id) { for(j=0;j<3;j++) - if(inb(ioaddr+cards[i].addr_offset+j) != cards[i].vendor_id[j]) { + if(inb(ioaddr+cards[i].addr_offset+j) != cards[i].vendor_id[j]) release_region(ioaddr, cards[i].total_size); - continue; - } } break; } diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index b8983e7..4738bc7 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c @@ -3679,11 +3679,9 @@ static void restore_xmsi_data(struct s2io_nic *nic) writeq(nic->msix_info[i].data, &bar0->xmsi_data); val64 = (s2BIT(7) | s2BIT(15) | vBIT(msix_index, 26, 6)); writeq(val64, &bar0->xmsi_access); - if (wait_for_msix_trans(nic, msix_index)) { + if (wait_for_msix_trans(nic, msix_index)) DBG_PRINT(ERR_DBG, "%s: index: %d failed\n", __func__, msix_index); - continue; - } } } diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c index 15fa47f..5cd4f3f 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c @@ -258,10 +258,8 @@ nfp_net_pf_alloc_vnics(struct nfp_pf *pf, void __iomem *ctrl_bar, ctrl_bar += NFP_PF_CSR_SLICE_SIZE; /* Kill the vNIC if app init marked it as invalid */ - if (nn->port && nn->port->type == NFP_PORT_INVALID) { + if (nn->port && nn->port->type == NFP_PORT_INVALID) nfp_net_pf_free_vnic(pf, nn); - continue; - } } if (list_empty(&pf->vnics)) -- 2.7.4