Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2236975pxb; Wed, 30 Mar 2022 20:17:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOo5z57Gto8A+I1C33QMl0pOPrP7TCkzB44GN5f+ZYElmbM/Mmu6uYk6Y6nUk3ieZKZAuK X-Received: by 2002:a17:90b:1d8d:b0:1c6:fad4:2930 with SMTP id pf13-20020a17090b1d8d00b001c6fad42930mr3562539pjb.159.1648696620730; Wed, 30 Mar 2022 20:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648696620; cv=none; d=google.com; s=arc-20160816; b=sUQfFusZdqLDPbRyQEyB/pBjp0zGoe2hmiqMD57g/civHlmpqGQnX8DpkXV61Qizpk fFjzJaDOVOe4qlOnaSl51fVtM5kYdOKQgrK79YuYTCOrlTVsrWmyquRGSHplKNSoBVBR 3JyopUfKxpfX1qMEozVXYteWCSV1DZhG5tqStSNCvSnOMGUCdqu0FFk+6qWjuVs9rt31 0HPagCvNI33iHNvXmehlhCeyd39rcJ4WrhPs6DWdwazu7gfAiQOJQM0s0rowhvWezbPW Qt4GWQM4SYkDFYvy8lFzmK3ROobhOkS4CgYsz5AdDQXXTPziy3XotDfqVPf/S4GLF035 pkbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=a7hYj2j0rg+oxu2SuXwW+90ert8AGVgDvnOBbBxW+6I=; b=D0Ey45IVtnGoomPAkxa7/xQ0qLGwe2AhhTEK6GDVsWx5MfpyNUBqSZOMbNysD6ZsCV r0iETYbd2V6JOMDvr7BbFPe5HXXg+yjQGjETeXfmOwJQ6LlR1MHiuGR25S27H1ED8fAF slew9c2EVdopPm2FGNoXrlKL6v6aUgfTSqWl8kYNEqLNC4sYb/xwF7jyjUWQmOy+lDa8 P+5IJ/nyM9fj5WSc45anvGxJcxogyvqRjB6304gJ4jo3GKo2KhIyaS4AAw45JpD1dNGL 8JrtAxOREH2ysj1yFaqEQgzolkjxZD4YNafdhD2l3wcodQD4Jq6mncMThn/QxEQxy4ds Ob+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=R4kBARKm; 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=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nm4-20020a17090b19c400b001c660f6b972si1816436pjb.143.2022.03.30.20.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:17:00 -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=@intel.com header.s=Intel header.b=R4kBARKm; 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=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 759C1FE433; Wed, 30 Mar 2022 19:49:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351782AbiC3XSG (ORCPT + 99 others); Wed, 30 Mar 2022 19:18:06 -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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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