Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5379975ybe; Tue, 17 Sep 2019 07:13:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfkRsASSW7DQkBLcojPbkCw5HgIVkAB6UbHs96IGueJt8cpdvF7DD76hYhRRTMdQ768qYA X-Received: by 2002:a17:906:a84d:: with SMTP id dx13mr5080196ejb.230.1568729595028; Tue, 17 Sep 2019 07:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568729595; cv=none; d=google.com; s=arc-20160816; b=yutJlMR1BqLMNq5KfivcU8id68fMWZ59BczpvwXJUrVPcaW/CxYRbYnfd5gmQ4EYQd M+MiFvaXy+/gntrCKXZ8G+gxPa5LA1I6t56dYHa6SDrRYGm19Cs7gqchF1AwW6aC/iDy 5RvvXA345a8i/IAiqff0FnS/KeV0pUNtEodbKWPgdSdCU+ew3eQylEuSPR0aJ4ov/v5K nvCByyKxsHgZdFMqCymtN3oDXY7Jz5W9VutIluQm5bOXLvYNFIPcjDOc737WYjhQnoi0 jVe94vd9PnSzN6Niz+8F58P/BcdCqsT89KEW/TdT+xMD/LysZe/Mm0IBP3CJyC3IKVeI U6mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=unX4nt1xIMYQ/f50lSB6SwAlK/crESHHsQ2/TTaIbRs=; b=SWPIs0+FZIvCbWa/V6DQbf3dFDi0v6I7iOgcdRo9LeJGPUo9x5EZMqne0zwfju3RT3 9kAhWBs/7dURHjahiXyqCCm6iLV8SWFWa+PrL7buEZ4Si+ajhw79JCwy3dLyNcjNHGst HX+3Te5v8pnUELGJ6vc6QvQIRQ90SQiE/Egd2tRiV6hf/Ni131mHKaiBbTE9eSMRwOSk 3gXHz0N/8bwfqRQ+VhJtoXIWAUJiLg/maUJ2M6j9oBP31VcKt9cWb0lcPxB8s6cHsp+O 6ea/yO1blXUG2Lb8kH0h5DU0cxPqRHsLKac5tS6Mp48itNmKOtDsuZNMgsq+/p3LJijI kXWA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si1403620edc.404.2019.09.17.07.12.51; Tue, 17 Sep 2019 07:13:15 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404098AbfIQDIE (ORCPT + 99 others); Mon, 16 Sep 2019 23:08:04 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2277 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727097AbfIQDID (ORCPT ); Mon, 16 Sep 2019 23:08:03 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E698E82D8048DD8737DE; Tue, 17 Sep 2019 11:08:01 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Tue, 17 Sep 2019 11:07:58 +0800 Message-ID: <5D804E0D.2070707@huawei.com> Date: Tue, 17 Sep 2019 11:07:57 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Jakub Kicinski CC: , , , , Subject: Re: [PATCH 2/3] nfp: Drop unnecessary continue in nfp_net_pf_alloc_vnics References: <1567568784-9669-1-git-send-email-zhongjiang@huawei.com> <1567568784-9669-3-git-send-email-zhongjiang@huawei.com> <20190916194502.0c014667@cakuba.netronome.com> In-Reply-To: <20190916194502.0c014667@cakuba.netronome.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/9/17 10:45, Jakub Kicinski wrote: > On Wed, 4 Sep 2019 11:46:23 +0800, zhong jiang wrote: >> Continue is not needed at the bottom of a loop. >> >> Signed-off-by: zhong jiang >> --- >> drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c >> index 986464d..68db47d 100644 >> --- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c >> +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c >> @@ -205,10 +205,8 @@ static void nfp_net_pf_free_vnics(struct nfp_pf *pf) >> 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; >> - } > Ugh, I already nack at least one patch like this, this continue makes > the _intent_ of the code more clear, the compiler will ignore it anyway. Thanks, I miss that information you object to above modification. Sincerely, zhong jiang > I guess there's no use in fighting the bots.. > >> } >> >> if (list_empty(&pf->vnics)) > > . >