linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Anubhav Shelat <ashelat@redhat.com>,
	mpetlan@redhat.com, acme@kernel.org, namhyung@kernel.org,
	irogers@google.com, linux-perf-users@vger.kernel.org
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	adrian.hunter@intel.com, kan.liang@linux.intel.com,
	james.clark@linaro.org
Subject: Re: [PATCH] perf pmu: fix duplicate conditional statement
Date: Wed, 26 Nov 2025 09:33:40 +0800	[thread overview]
Message-ID: <9efbbdad-c7d6-46ac-89f3-6ed28533b85c@linux.intel.com> (raw)
In-Reply-To: <20251125114118.196089-1-ashelat@redhat.com>


On 11/25/2025 7:41 PM, Anubhav Shelat wrote:
> Remove duplicate check for PERF_PMU_TYPE_DRM_END in perf_pmu__kind.
>
> Fixes cedf1f4852ae.

The code change looks good to me. But the offensive commit hash ID seems
incorrect.

The change comes from this commit.

f0feb21e0a10 ("perf pmu: Add PMU kind to simplify differentiating")

Better add a "Fixes" tag for this change. 

>
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
>  tools/perf/util/pmu.h | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
> index cfcaba3e2e75..723a67cb41f4 100644
> --- a/tools/perf/util/pmu.h
> +++ b/tools/perf/util/pmu.h
> @@ -331,8 +331,6 @@ static inline enum pmu_kind perf_pmu__kind(const struct perf_pmu *pmu)
>  		return PERF_PMU_KIND_PE;
>  	if (type <= PERF_PMU_TYPE_DRM_END)
>  		return PERF_PMU_KIND_DRM;
> -	if (type <= PERF_PMU_TYPE_DRM_END)
> -		return PERF_PMU_KIND_DRM;
>  	if (type <= PERF_PMU_TYPE_HWMON_END)
>  		return PERF_PMU_KIND_HWMON;
>  	if (type == PERF_PMU_TYPE_TOOL)

  reply	other threads:[~2025-11-26  1:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 22:05 [PATCH v1 1/3] perf header: Switch "cpu" for find_core_pmu in caps feature writing Ian Rogers
2025-11-14 22:05 ` [PATCH v1 2/3] perf pmu: Add PMU kind to simplify differentiating Ian Rogers
2025-11-24 12:34   ` Anubhav Shelat
2025-11-24 20:22     ` Namhyung Kim
2025-11-25 11:41   ` [PATCH] perf pmu: fix duplicate conditional statement Anubhav Shelat
2025-11-26  1:33     ` Mi, Dapeng [this message]
2025-11-26  2:27       ` Ian Rogers
2025-11-27 20:58     ` Namhyung Kim
2025-11-14 22:05 ` [PATCH v1 3/3] perf evsel: Skip store_evsel_ids for non-perf-event PMUs Ian Rogers
2025-11-17 19:47   ` Falcon, Thomas
2025-11-20 19:02 ` [PATCH v1 1/3] perf header: Switch "cpu" for find_core_pmu in caps feature writing Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9efbbdad-c7d6-46ac-89f3-6ed28533b85c@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ashelat@redhat.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).