From: Anubhav Shelat Date: Tue, 25 Nov 2025 11:41:18 +0000 (+0000) Subject: perf pmu: fix duplicate conditional statement X-Git-Tag: v6.19-rc1~61^2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87c75fa75559f5501b5a03caf442f18899e388be;p=thirdparty%2Fkernel%2Flinux.git perf pmu: fix duplicate conditional statement Remove duplicate check for PERF_PMU_TYPE_DRM_END in perf_pmu__kind. Fixes: f0feb21e0a10 ("perf pmu: Add PMU kind to simplify differentiating") Signed-off-by: Anubhav Shelat Reviewed-by: Ian Rogers Closes: https://lore.kernel.org/linux-perf-users/CA+G8Dh+wLx+FvjjoEkypqvXhbzWEQVpykovzrsHi2_eQjHkzQA@mail.gmail.com/ Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h index 5738e88fbb548..8f11bfe8ed6d8 100644 --- a/tools/perf/util/pmu.h +++ b/tools/perf/util/pmu.h @@ -332,8 +332,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)