From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CF03C432BE for ; Wed, 1 Sep 2021 16:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F2E16108E for ; Wed, 1 Sep 2021 16:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245500AbhIAQjz (ORCPT ); Wed, 1 Sep 2021 12:39:55 -0400 Received: from mga01.intel.com ([192.55.52.88]:58989 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232317AbhIAQjy (ORCPT ); Wed, 1 Sep 2021 12:39:54 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10094"; a="241075131" X-IronPort-AV: E=Sophos;i="5.84,369,1620716400"; d="scan'208";a="241075131" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2021 09:38:57 -0700 X-IronPort-AV: E=Sophos;i="5.84,369,1620716400"; d="scan'208";a="510487177" Received: from seware-mobl.amr.corp.intel.com (HELO vcostago-mobl2.amr.corp.intel.com) ([10.209.104.177]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2021 09:38:57 -0700 From: Vinicius Costa Gomes To: Colin King , Jesse Brandeburg , Tony Nguyen , "David S . Miller" , Jakub Kicinski , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] igc: remove redundant continue statement In-Reply-To: <20210829165150.531678-1-colin.king@canonical.com> References: <20210829165150.531678-1-colin.king@canonical.com> Date: Wed, 01 Sep 2021 09:38:57 -0700 Message-ID: <878s0g2qu6.fsf@vcostago-mobl2.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Colin King writes: > From: Colin Ian King > > The continue statement at the end of a for-loop has no effect, > remove it. > > Addresses-Coverity: ("Continue has no effect") > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/intel/igc/igc_ptp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c > index 0f021909b430..b615a980f563 100644 > --- a/drivers/net/ethernet/intel/igc/igc_ptp.c > +++ b/drivers/net/ethernet/intel/igc/igc_ptp.c > @@ -860,7 +860,6 @@ static int igc_phc_get_syncdevicetime(ktime_t *device, > * so write the previous error status to clear it. > */ > wr32(IGC_PTM_STAT, stat); > - continue; Just a bit of background. I added the "continue" here more as documentation: we handled an error, and we want to try again, I felt that the continue helps making that clearer. But I am not completely opposed about removing it. > } > } while (--count); > > -- > 2.32.0 > Cheers, -- Vinicius