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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB6C0C433FE for ; Wed, 30 Mar 2022 23:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351786AbiC3XSH (ORCPT ); Wed, 30 Mar 2022 19:18:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234105AbiC3XSF (ORCPT ); Wed, 30 Mar 2022 19:18:05 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F0E63F889; Wed, 30 Mar 2022 16:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648682179; x=1680218179; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=y4DLfy2pzwgVQOJCh+BUqzSf3DbodzSEIqyQmkhlB44=; b=R4kBARKm9l0uWr/974JLNzhkkHZQlPdvtk2f92Kb3hf0KbkDrvWhrmYg jlyT0BOM5SR/6etT/tAbxJIPEuvcCgX4bj/1ydD3gi4UsDMuWXbz3MS05 js5K7RqDIU+MfAYGU8GkhKzls7d2qTo/WyKB1xVjiW3K+5BFjTaSQLpXm WKrAkHOPuLHChtFf9FfouFD9xNzXvUXNt6ykP+Rlw/Oefysp4JWbMGWWG XGbafkoEL2GfR2cvIgHLRsvBpmkbSAGsAk5VFda7NYla4SigaYCT/Bvbp VrI8zv0a0NOosDB7nJTWtZQWF28e3iaVxsuByDE6oStMycXPg2Bk1X697 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="241819753" X-IronPort-AV: E=Sophos;i="5.90,223,1643702400"; d="scan'208";a="241819753" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 16:16:05 -0700 X-IronPort-AV: E=Sophos;i="5.90,223,1643702400"; d="scan'208";a="522094772" Received: from vcostago-mobl3.jf.intel.com (HELO vcostago-mobl3) ([10.24.14.50]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 16:16:05 -0700 From: Vinicius Costa Gomes To: Jakob Koschel Cc: Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." , Jakob Koschel Subject: Re: [PATCH] taprio: replace usage of found with dedicated list iterator variable In-Reply-To: <20220324072607.63594-1-jakobkoschel@gmail.com> References: <20220324072607.63594-1-jakobkoschel@gmail.com> Date: Wed, 30 Mar 2022 16:15:53 -0700 Message-ID: <87fsmz3uc6.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jakob Koschel writes: > To move the list iterator variable into the list_for_each_entry_*() > macro in the future it should be avoided to use the list iterator > variable after the loop body. > > To *never* use the list iterator variable after the loop it was > concluded to use a separate iterator variable instead of a > found boolean [1]. > > This removes the need to use a found variable and simply checking if > the variable was set, can determine if the break/goto was hit. > > Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ > Signed-off-by: Jakob Koschel > --- Code wise, patch look good. Just some commit style/meta comments: - I think that it would make more sense that these were two separate patches, but I haven't been following the fallout of the discussion above to know what other folks are doing; - Please use '[PATCH net-next]' in the subject prefix of your patch(es) when you next propose this (net-next is closed for new submissions for now, it should open again in a few days); Cheers, -- Vinicius