Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2372671pxb; Sun, 3 Apr 2022 04:44:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp+v6N2AeyF0ENqqKmzcKEGMNeEa+mV0ScVtMS85UdcjIhJe5zouCyxo89UBm9sCCHvtaG X-Received: by 2002:a17:90b:2246:b0:1c6:5781:7193 with SMTP id hk6-20020a17090b224600b001c657817193mr21351782pjb.48.1648986249116; Sun, 03 Apr 2022 04:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648986249; cv=none; d=google.com; s=arc-20160816; b=IB/codhCPXGxv/51FucXtmwWOb9U4ZJBMqkIuLCPy8H7hy/M1o9jpRYpW06aq7lLSS ZIRJvatblg091OX2L7uxf/Rt9LyWuobAEZQfSyPz13L51lApZQrd7kFtUuYTZF7GPN3/ wVO063KqgJAB3omlJQegeJCY3XxQSqXXURbBWLowhuyViQL30A1JsGmBmLDUH3p1/MFV Fobt7Rp5oUeoERV2srixmXAhXWBb6TO+GpXaYgvCoE5U1RFKb5nGBugmcXnJNNKcfpY2 LIOv64qgAqdvII7i7oh/l2e8vB4CGcbWGA1t5zKJ5KcU0GPgNJ5yOS2+2YNoIZwXPCM6 d0ig== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=i6rCtHdzYgVTzWbWwvY8R1K3tYk8i64z1/WICkBQypg=; b=ASii0L7AYA0lzCCxY9qYJifHAeDdROCGyyPuoS9xi9/xgZDzIO46g8leCsKGBGmS4I GFWwqGEVOLZc1VuQAenHIShwVWilzwicmyPS6o6eQX6iNumSZy+lFwU7kBlFua8BC3ri nc45Msm7k1vmxi0myhNrUCtyhVyf4YiDzpkSljkwzSMNDGsFGUi6PB8o+2xsxahzgQlY CwZQMquZYlZTdUCyV24M1awzsbZW5KSg65OdNJKqWSqwQpPBP7O/Qip+ojKmf23CJdbm vpPwBm36sKgA8lmAOs5AaVqc7Bf3zpD0HrNAjZfkG9iWBtIDk8QMyFjT/CM9WubUyE6+ NV4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AGCHHKll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a6545c1000000b0038234dbb532si7492586pgr.378.2022.04.03.04.43.56; Sun, 03 Apr 2022 04:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AGCHHKll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354390AbiDBKfv (ORCPT + 99 others); Sat, 2 Apr 2022 06:35:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbiDBKft (ORCPT ); Sat, 2 Apr 2022 06:35:49 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD729F55C7 for ; Sat, 2 Apr 2022 03:33:57 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id u26so5618168eda.12 for ; Sat, 02 Apr 2022 03:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i6rCtHdzYgVTzWbWwvY8R1K3tYk8i64z1/WICkBQypg=; b=AGCHHKllvpl+ZSzTJrrEx0vD30/duhHJ+Wd3fafM80d8Kc3te3m4oolxGY7OGbSwiQ eC59m3zuv1dDkxVhmDr20aITERDls8sqiYsbos9a++l5OKmNpWQQOHxJevh67BNAFZC0 UqTd+wuxm7fOC25ge1dTQK9WChEIqPW1ePS4NJuY6qIbdnKH14KUDshdfka8knWO1cLz krLOnrsAyCVCGw//TRc8dnqUmnk8NkVcVa/AzWU8Gq8Q8uWbAsoMSrQTn+hrGMq4+cGu ff6aw0ZrKmx7SRdOgYAdmy7w7dDC7uRuV1C/mDS7kiKlCAcrI6jDBGZxveAs78nTRf3/ xrGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i6rCtHdzYgVTzWbWwvY8R1K3tYk8i64z1/WICkBQypg=; b=G5TVj6bmcI3oHnAffS9HsNGTMC5BVvB9ltXaIyVEgEaQgCTBKT/C7JNkRwKAx3MC1U n3XNecqbjphjnRCHmgA3vosespGMg+8IAKXBG4A5gOoBQSQQo6HrjnjbsFvCPgPC/iTI FbcXx+mvKnJI61DwwduPGuN7Mv9FlVSHiGLjCowb+Xw/vYX4QxtD2qaFxbwrYFNJBjuR ZzcxweuSlrb6dtQngmwcp9guti1nmrf8sgXWQRYnhWOLb81R7TBWt6D67sGKZg0NUA1r ATmBM9kdiBpNz75C6ObEMiXgjB6lpGwBX2Zb4d5JjvPw98LAQOLfa4OTFKlLJdYZRCVA 6hIQ== X-Gm-Message-State: AOAM533ilLA+PbyrfwXWB6pb1pusexsE6spw9HWG6n5FVpVwyY6vq9kv vJyLzaacEhw+kt3GOLti7t0= X-Received: by 2002:aa7:d398:0:b0:419:d011:fe8b with SMTP id x24-20020aa7d398000000b00419d011fe8bmr25199612edq.168.1648895636412; Sat, 02 Apr 2022 03:33:56 -0700 (PDT) Received: from localhost.localdomain (i130160.upc-i.chello.nl. [62.195.130.160]) by smtp.googlemail.com with ESMTPSA id ka22-20020a170907921600b006e4c1ab0bbdsm1886965ejb.207.2022.04.02.03.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 03:33:56 -0700 (PDT) From: Jakob Koschel To: Steven Rostedt Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Mike Rapoport , "Brian Johannesmeyer" , Cristiano Giuffrida , "Bos, H.J." , Jakob Koschel Subject: [PATCH v2 0/4] Remove usage of list iterator after the loop body Date: Sat, 2 Apr 2022 12:33:37 +0200 Message-Id: <20220402103341.1763932-1-jakobkoschel@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 In preparation to limit the scope of a list iterator to the list traversal loop, use a dedicated pointer as the iterator [1]. Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ v1->v2: - fix reverse x-mas tree (Steven Rostedt) - rename subject line (Steven Rostedt) - add additional tracing patches to bundle them all up in one go Sorry, I corrupted the Subject line on the previous send, please ignore :( Jakob Koschel (4): tracing: Remove usage of list iterator after the loop body tracing: Remove usage of list iterator variable after the loop tracing: Replace usage of found with dedicated list iterator variable tracing: Remove check of list iterator against head past the loop body kernel/trace/ftrace.c | 20 ++++++++++++-------- kernel/trace/trace_eprobe.c | 14 ++++++++------ kernel/trace/trace_events.c | 29 ++++++++++++++--------------- kernel/trace/trace_events_hist.c | 17 ++++++++--------- kernel/trace/trace_events_trigger.c | 28 +++++++++++++--------------- kernel/trace/trace_output.c | 13 +++++++++---- 6 files changed, 64 insertions(+), 57 deletions(-) base-commit: 7a3ecddc571cc3294e5d6bb5948ff2b0cfa12735 -- 2.25.1