* [PATCH] perf/x86/intel/uncore: remove dead check
@ 2025-11-19 9:15 Jiri Slaby (SUSE)
2025-11-19 9:33 ` [tip: perf/urgent] perf/x86/intel/uncore: Remove superfluous check tip-bot2 for Jiri Slaby (SUSE)
2025-11-19 10:25 ` [PATCH] perf/x86/intel/uncore: remove dead check Mi, Dapeng
0 siblings, 2 replies; 5+ messages in thread
From: Jiri Slaby (SUSE) @ 2025-11-19 9:15 UTC (permalink / raw)
To: peterz
Cc: linux-kernel, Jiri Slaby (SUSE),
Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
Adrian Hunter, Liang, Kan, Thomas Gleixner, Borislav Petkov,
Dave Hansen, H. Peter Anvin, x86, linux-perf-users
pmu cannot be NULL as is taken as a pointer to an array. Remove the
superfluous NULL check.
Found by Coverity: CID#1497507.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: linux-perf-users@vger.kernel.org
---
arch/x86/events/intel/uncore.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index d6c945cc5d07..e228e564b15e 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -1325,8 +1325,6 @@ static void uncore_pci_sub_driver_init(void)
continue;
pmu = &type->pmus[UNCORE_PCI_DEV_IDX(ids->driver_data)];
- if (!pmu)
- continue;
if (uncore_pci_get_dev_die_info(pci_sub_dev, &die))
continue;
--
2.51.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: perf/urgent] perf/x86/intel/uncore: Remove superfluous check
2025-11-19 9:15 [PATCH] perf/x86/intel/uncore: remove dead check Jiri Slaby (SUSE)
@ 2025-11-19 9:33 ` tip-bot2 for Jiri Slaby (SUSE)
2025-11-19 10:25 ` [PATCH] perf/x86/intel/uncore: remove dead check Mi, Dapeng
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot2 for Jiri Slaby (SUSE) @ 2025-11-19 9:33 UTC (permalink / raw)
To: linux-tip-commits
Cc: Jiri Slaby (SUSE),
Ingo Molnar, Liang Kan, Peter Zijlstra, x86, linux-kernel
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: a24074ca8840cf28fa50c40e957fdc50f29971b3
Gitweb: https://git.kernel.org/tip/a24074ca8840cf28fa50c40e957fdc50f29971b3
Author: Jiri Slaby (SUSE) <jirislaby@kernel.org>
AuthorDate: Wed, 19 Nov 2025 10:15:38 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 19 Nov 2025 10:26:31 +01:00
perf/x86/intel/uncore: Remove superfluous check
The 'pmu' pointer cannot be NULL, as it is taken as a pointer to an array.
Remove the superfluous NULL check.
Found by Coverity: CID#1497507.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Liang Kan <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://patch.msgid.link/20251119091538.825307-1-jirislaby@kernel.org
---
arch/x86/events/intel/uncore.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index d6c945c..e228e56 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -1325,8 +1325,6 @@ static void uncore_pci_sub_driver_init(void)
continue;
pmu = &type->pmus[UNCORE_PCI_DEV_IDX(ids->driver_data)];
- if (!pmu)
- continue;
if (uncore_pci_get_dev_die_info(pci_sub_dev, &die))
continue;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf/x86/intel/uncore: remove dead check
2025-11-19 9:15 [PATCH] perf/x86/intel/uncore: remove dead check Jiri Slaby (SUSE)
2025-11-19 9:33 ` [tip: perf/urgent] perf/x86/intel/uncore: Remove superfluous check tip-bot2 for Jiri Slaby (SUSE)
@ 2025-11-19 10:25 ` Mi, Dapeng
2025-11-23 0:30 ` Ian Rogers
1 sibling, 1 reply; 5+ messages in thread
From: Mi, Dapeng @ 2025-11-19 10:25 UTC (permalink / raw)
To: Jiri Slaby (SUSE), peterz
Cc: linux-kernel, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Liang, Kan, Thomas Gleixner,
Borislav Petkov, Dave Hansen, H. Peter Anvin, x86,
linux-perf-users
On 11/19/2025 5:15 PM, Jiri Slaby (SUSE) wrote:
> pmu cannot be NULL as is taken as a pointer to an array. Remove the
> superfluous NULL check.
>
> Found by Coverity: CID#1497507.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> ---
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: "Liang, Kan" <kan.liang@linux.intel.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: linux-perf-users@vger.kernel.org
> ---
> arch/x86/events/intel/uncore.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
> index d6c945cc5d07..e228e564b15e 100644
> --- a/arch/x86/events/intel/uncore.c
> +++ b/arch/x86/events/intel/uncore.c
> @@ -1325,8 +1325,6 @@ static void uncore_pci_sub_driver_init(void)
> continue;
>
> pmu = &type->pmus[UNCORE_PCI_DEV_IDX(ids->driver_data)];
> - if (!pmu)
> - continue;
>
> if (uncore_pci_get_dev_die_info(pci_sub_dev, &die))
> continue;
LGTM.
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf/x86/intel/uncore: remove dead check
2025-11-19 10:25 ` [PATCH] perf/x86/intel/uncore: remove dead check Mi, Dapeng
@ 2025-11-23 0:30 ` Ian Rogers
0 siblings, 0 replies; 5+ messages in thread
From: Ian Rogers @ 2025-11-23 0:30 UTC (permalink / raw)
To: Mi, Dapeng
Cc: Jiri Slaby (SUSE),
peterz, linux-kernel, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Adrian Hunter, Liang, Kan, Thomas Gleixner, Borislav Petkov,
Dave Hansen, H. Peter Anvin, x86, linux-perf-users
On Wed, Nov 19, 2025 at 2:25 AM Mi, Dapeng <dapeng1.mi@linux.intel.com> wrote:
>
>
> On 11/19/2025 5:15 PM, Jiri Slaby (SUSE) wrote:
> > pmu cannot be NULL as is taken as a pointer to an array. Remove the
> > superfluous NULL check.
> >
> > Found by Coverity: CID#1497507.
> >
> > Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> > ---
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Ian Rogers <irogers@google.com>
> > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > Cc: "Liang, Kan" <kan.liang@linux.intel.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Borislav Petkov <bp@alien8.de>
> > Cc: Dave Hansen <dave.hansen@linux.intel.com>
> > Cc: "H. Peter Anvin" <hpa@zytor.com>
> > Cc: x86@kernel.org
> > Cc: linux-perf-users@vger.kernel.org
> > ---
> > arch/x86/events/intel/uncore.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
> > index d6c945cc5d07..e228e564b15e 100644
> > --- a/arch/x86/events/intel/uncore.c
> > +++ b/arch/x86/events/intel/uncore.c
> > @@ -1325,8 +1325,6 @@ static void uncore_pci_sub_driver_init(void)
> > continue;
> >
> > pmu = &type->pmus[UNCORE_PCI_DEV_IDX(ids->driver_data)];
> > - if (!pmu)
> > - continue;
> >
> > if (uncore_pci_get_dev_die_info(pci_sub_dev, &die))
> > continue;
>
> LGTM.
>
> Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] perf/x86/intel/uncore: remove dead check
@ 2025-07-31 9:58 Jiri Slaby (SUSE)
0 siblings, 0 replies; 5+ messages in thread
From: Jiri Slaby (SUSE) @ 2025-07-31 9:58 UTC (permalink / raw)
To: mingo
Cc: linux-kernel, Jiri Slaby (SUSE),
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Liang, Kan, Thomas Gleixner,
Borislav Petkov, Dave Hansen, H. Peter Anvin, x86,
linux-perf-users
pmu cannot be NULL as is taken as a pointer to an array. Remove the
superfluous NULL check.
Found by Coverity: CID#1497507.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
Cc: x86@kernel.org
Cc: linux-perf-users@vger.kernel.org
---
arch/x86/events/intel/uncore.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index a762f7f5b161..9c08d86ea53a 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -1325,8 +1325,6 @@ static void uncore_pci_sub_driver_init(void)
continue;
pmu = &type->pmus[UNCORE_PCI_DEV_IDX(ids->driver_data)];
- if (!pmu)
- continue;
if (uncore_pci_get_dev_die_info(pci_sub_dev, &die))
continue;
--
2.50.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-23 0:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-19 9:15 [PATCH] perf/x86/intel/uncore: remove dead check Jiri Slaby (SUSE)
2025-11-19 9:33 ` [tip: perf/urgent] perf/x86/intel/uncore: Remove superfluous check tip-bot2 for Jiri Slaby (SUSE)
2025-11-19 10:25 ` [PATCH] perf/x86/intel/uncore: remove dead check Mi, Dapeng
2025-11-23 0:30 ` Ian Rogers
-- strict thread matches above, loose matches on Subject: below --
2025-07-31 9:58 Jiri Slaby (SUSE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome