Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp381108rwr; Wed, 26 Apr 2023 00:10:46 -0700 (PDT) X-Google-Smtp-Source: AKy350aLSXQOCAROYr4RuzvWMSH7Ow8tOwTvfDqnuth+Wt8dj1p4DGlL87xD6PbdoqviasgbrvW2 X-Received: by 2002:a05:6a20:a10d:b0:f0:b6e3:90c9 with SMTP id q13-20020a056a20a10d00b000f0b6e390c9mr25438023pzk.4.1682493046460; Wed, 26 Apr 2023 00:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682493046; cv=none; d=google.com; s=arc-20160816; b=jddukbQsMy3FeihDg86uYqDgYSnaOjH3U+JGqN5q8GsrLYLLQ9oeHgpW62CA1W3vtd +IrbmoY+uMhsu5MXaPphn+VJEu+XilbaeAUb91PyzmoLtJzVcxlyuB1leXhg6MY8ejZt 7dBTvbvMrXTL2y0kSf3l/2icbNbLpSfNybgZduFzSok7NaTt56PLOhKNca6xZgJPGigA j65lKXFn5QM8zMXj/Xjw2EhORBV53IGCzndtifZ/RSA+9yl2i/jubuxw6pSK35nMAck9 m99nHj8m8MWTnQkLybbhUuIRYj3FTqAl7tabkUXAnAOonNmPnXxV1I16JS2mIFe82Zjx m7Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=feNyjAPtIUSUDrmLxKNanb31JNx+5xcJ7s4SppqU3s8=; b=EP2baoxvpkpz5ktLiqhpT4lM0KkY7honCuN9KR6G4qkGBATpKM7pkMScCGduRJy8+k JehgH0EQnTQLw46kdru4IPScNo3tkzZR5kn1k6kgHhUJPQiHiawBzu9DGBtXmZ2/IoaQ awNcDqNxXdLQvcudGefIXOyPTSNYVdhH6D5gLmhJeSWgH6f/LRshneXyRV0EcdplJ6WO 07OXgBPCByKzquZbeXBHcc1HoNfS2OxKBJpnwT/2UjfJzsMwlSojIWvrHWUg4Q66TjbW 9D0ewOSe9idT+7QZxicEVAFnH3DbDJZZQs9lj2qey9nx+Gg7W4iT+uHBkYtDAHLB3zOY Vy9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=E+SOnPbv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a63c104000000b0051b5974f978si14867206pgf.313.2023.04.26.00.10.35; Wed, 26 Apr 2023 00:10:46 -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=@google.com header.s=20221208 header.b=E+SOnPbv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239912AbjDZHGk (ORCPT + 99 others); Wed, 26 Apr 2023 03:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239877AbjDZHGG (ORCPT ); Wed, 26 Apr 2023 03:06:06 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 372AC49C5 for ; Wed, 26 Apr 2023 00:04:50 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-b92309d84c1so33258364276.1 for ; Wed, 26 Apr 2023 00:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682492671; x=1685084671; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=feNyjAPtIUSUDrmLxKNanb31JNx+5xcJ7s4SppqU3s8=; b=E+SOnPbvLMhSx3vfiAPHcNOKyPNN4YgTfBFYZQgy3oai/RcemJIQkVdIHB1gEYEm0E AALHPZJqwqzXOG/1MXsJj9thuOwGceyi6gbQPqF+Mp5e5SHSD/I85E+XZkYPKRlmkL/q VfRXV/U++gYLzLgQqcKvpm8JXqD2WDIGJOxF4m7ZGmLTaUeicdd5usQdevYvRc2Z7OeC oDo2u2COuK+YBWclXLZfqIrA584ZuGH803Wr+9JevBe4Csw65RcZsZwRAg2zINfyWPrM YmhiFG2ZkAcnni7z57KOisiwAa1AX8BPG5eMvalB4lC7Z4G1S/Dx5iJ9D9xB9b9nDKYP 7B4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682492671; x=1685084671; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=feNyjAPtIUSUDrmLxKNanb31JNx+5xcJ7s4SppqU3s8=; b=Bz2sQBl6F8kh1tAvyR3WqjU3Q1Rtepr5ZmJwmc8BPoYsQCkcO6AYwRQPsDdDuWSiNN R1rDChursAl+jjbZZ4AKQgBZa7HdSvxeuhOXIPSYFxm68VFplBiGZ2bSDfVLILWeP1pu 6OY7EPLy2f8ntFbLc60GIWyuJtSCvZ2Am0vTp+cZ2Gss1tSm530ZdcE9+mXTRDR9Fwgm 7wzWMK4M03i4hCVSrFZ//2W9UlvxvDhz6XspCTDGs0EuQndRb8ceIPGgxCHY7U8R7bbw P6mU/Aw2me3sMc5692/bB/dcZ+6rPylqo5eRi+ybfIGfuPjoxI2mCTQY5Jz01GZYMMLl +w4A== X-Gm-Message-State: AC+VfDxfGVRcR+b5r6qOCDE2g5kpXAEuXTeAEhyK+ATI42GJIrFgjAjh +4R6G3dDBISTHJ2BupQKZbzA3qVYbsV3 X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:144f:e890:2b29:48d9]) (user=irogers job=sendgmr) by 2002:a05:690c:2f82:b0:54f:e2ca:3085 with SMTP id ew2-20020a05690c2f8200b0054fe2ca3085mr940938ywb.1.1682492671653; Wed, 26 Apr 2023 00:04:31 -0700 (PDT) Date: Wed, 26 Apr 2023 00:00:35 -0700 In-Reply-To: <20230426070050.1315519-1-irogers@google.com> Message-Id: <20230426070050.1315519-26-irogers@google.com> Mime-Version: 1.0 References: <20230426070050.1315519-1-irogers@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Subject: [PATCH v1 25/40] perf parse-events: Minor type safety cleanup From: Ian Rogers To: Arnaldo Carvalho de Melo , Kan Liang , Ahmad Yasin , Peter Zijlstra , Ingo Molnar , Stephane Eranian , Andi Kleen , Perry Taylor , Samantha Alt , Caleb Biggers , Weilin Wang , Edward Baker , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Florian Fischer , Rob Herring , Zhengjun Xing , John Garry , Kajol Jain , Sumanth Korikkar , Thomas Richter , Tiezhu Yang , Ravi Bangoria , Leo Yan , Yang Jihong , James Clark , Suzuki Poulouse , Kang Minchul , Athira Rajeev , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 Use the typed parse_state rather than void* _parse_state when available. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y index 5055a29a448f..e709508b1d6e 100644 --- a/tools/perf/util/parse-events.y +++ b/tools/perf/util/parse-events.y @@ -301,7 +301,7 @@ PE_NAME opt_pmu_config if (!list) CLEANUP_YYABORT; /* Attempt to add to list assuming $1 is a PMU name. */ - if (parse_events_add_pmu(_parse_state, list, $1, $2, /*auto_merge_stats=*/false)) { + if (parse_events_add_pmu(parse_state, list, $1, $2, /*auto_merge_stats=*/false)) { struct perf_pmu *pmu = NULL; int ok = 0; @@ -319,7 +319,7 @@ PE_NAME opt_pmu_config !perf_pmu__match(pattern, pmu->alias_name, $1)) { if (parse_events_copy_term_list(orig_terms, &terms)) CLEANUP_YYABORT; - if (!parse_events_add_pmu(_parse_state, list, pmu->name, terms, + if (!parse_events_add_pmu(parse_state, list, pmu->name, terms, /*auto_merge_stats=*/true)) { ok++; parse_state->wild_card_pmus = true; @@ -331,7 +331,7 @@ PE_NAME opt_pmu_config if (!ok) { /* Failure to add, assume $1 is an event name. */ zfree(&list); - ok = !parse_events_multi_pmu_add(_parse_state, $1, $2, &list); + ok = !parse_events_multi_pmu_add(parse_state, $1, $2, &list); $2 = NULL; } if (!ok) -- 2.40.1.495.gc816e09b53d-goog