Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1007432pxb; Wed, 6 Apr 2022 06:34:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVdMMiei6Wo7Ga8ZOqnISUsmdtoLNycIS5c/4Bt/YnJzAUz6Xrs+QGuSkOKQYHqUPEqgQc X-Received: by 2002:a17:902:b406:b0:14f:bb35:95ab with SMTP id x6-20020a170902b40600b0014fbb3595abmr8495064plr.140.1649252084090; Wed, 06 Apr 2022 06:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649252084; cv=none; d=google.com; s=arc-20160816; b=PPpw6eQEGAmDbuBuS4Wa82ZbhRgYQ/SA+ZgajPy6ZoObOdbgidTTE2TyUz1xQq3L4O F3YMOtd+vI2i4ZgRQOv/TnMXlNl4IbNLIsQbnvmTuYLO+uaivhFGneEpLPrbgulpQ0ii rdPdvPd84Tjk5BR1vrZ7gEtDvXwq44epDoAcmPqaEc+WNl+gyOowZ65ehwFeAKrgIt1o yz+2brCYbjt+AO7VH/cyc7wI2WFgJ3VfcfZa1cbN+s5MnYDBcyT9STNr3/ShgCwJtUuq aucuEn8SXLdY0InkXC73V2Cs3qNnA4RzJDtg6zChTBXDBpIyufl1k/O0mMR5Ramkw9Yz 4+HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xdMGbqRCK5BlC6bK2Cy1q1h1Ea3jFeuCSZ95OHgkxIY=; b=yHElPB/1CSRjd10PW/zkvqj5BtuHD58e1dzZtgkSpYxJsnB0HevC1MHM5nWhGlukyl sVngrdweR8H17HDdaknkJxYYVsi/FBFXlGTx3Ivc7Nl82Sdj2E+8uzGTjUkT5+RQLrHA JvZHapIvj7uocKYCWtkCI8DMyhtBrx6Gr4nI6AW55zbx8iR+/GmQUqiwLqwQlW95Z2fl oELkLVwKMDl7hVCF/2hUZ2roOb46BEebWyWOGjYAHCXV4yNadvcxpqQdYjWCwvluf//b P6YY7SH+ZwyklVcxy3Fy5YajG+Ve4Z+9s/kbpwE/wtc8/lupjXq2eh/fD/WM0CUtQKDn /TyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YRmQIurr; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mq4-20020a17090b380400b001c6a32da182si5867069pjb.3.2022.04.06.06.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:34:44 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YRmQIurr; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2D11053F7A7; Wed, 6 Apr 2022 04:14:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1848516AbiDFCXX (ORCPT + 99 others); Tue, 5 Apr 2022 22:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356225AbiDEUtr (ORCPT ); Tue, 5 Apr 2022 16:49:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3320EF9FB0; Tue, 5 Apr 2022 13:23:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A4DD8B81FCB; Tue, 5 Apr 2022 20:23:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04ED9C385A0; Tue, 5 Apr 2022 20:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649190235; bh=+h8ZzTU60u7YqBVIktB8t5HoId/6yDAI8cwBhdE5rx4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YRmQIurrg8g5lOoNCeCLHV8pjFQHFNKpKutlj3rwqbZWrX585/wHFcvVjJ4XJIAzi o/asCoEHFHp1cTaZ5qunmw75i6CKLx43dv0ndUo2K0+1NT1hIU/2bMQNvkpC1rczaT 5DlGx/gyqkWSCXSgYY57BaZYOlidksTeY4WJA3FpWCW6fBj9r3Vwebc3kCnWAqoeL9 m9pD6t43Kx1ct23VNg8pnqvj5WAPFTxrUBYA1RPrXq1y3knRF58FzRfd0GQ70E1fj9 3mQQDQ5vmJ7fPiDnSzuW3EakOch9qTx/cV+mArhWMSaQ3kLVK5058ifLwydjTNf3jE H9c/3NJHaQrzw== Date: Tue, 5 Apr 2022 13:23:53 -0700 From: Jakub Kicinski To: Ido Schimmel Cc: Tom Rix , idosch@nvidia.com, petrm@nvidia.com, davem@davemloft.net, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mlxsw: spectrum_router: simplify list unwinding Message-ID: <20220405132353.00e7cb5e@kernel.org> In-Reply-To: References: <20220402121516.2750284-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 3 Apr 2022 16:10:19 +0300 Ido Schimmel wrote: > On Sat, Apr 02, 2022 at 08:15:16AM -0400, Tom Rix wrote: > > The setting of i here > > err_nexthop6_group_get: > > i = nrt6; > > Is redundant, i is already nrt6. So remove > > this statement. > > > > The for loop for the unwinding > > err_rt6_create: > > for (i--; i >= 0; i--) { > > Is equivelent to > > for (; i > 0; i--) { > > > > Two consecutive labels can be reduced to one. > > > > Signed-off-by: Tom Rix > > For net-next: > > Reviewed-by: Ido Schimmel Now 6f2f36e5f932 ("mlxsw: spectrum_router: simplify list unwinding") Thanks!