[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fWBME6Di_=uPqytjPEM9a=S+qm-fDcUXJczwNtH5jjVdA@mail.gmail.com>
Date: Sat, 22 Nov 2025 16:30:33 -0800
From: Ian Rogers <irogers@...gle.com>
To: "Mi, Dapeng" <dapeng1.mi@...ux.intel.com>
Cc: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>, peterz@...radead.org,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, "Liang, Kan" <kan.liang@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf/x86/intel/uncore: remove dead check
On Wed, Nov 19, 2025 at 2:25 AM Mi, Dapeng <dapeng1.mi@...ux.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@...nel.org>
> > ---
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
> > Cc: Namhyung Kim <namhyung@...nel.org>
> > Cc: Mark Rutland <mark.rutland@....com>
> > Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> > Cc: Jiri Olsa <jolsa@...nel.org>
> > Cc: Ian Rogers <irogers@...gle.com>
> > Cc: Adrian Hunter <adrian.hunter@...el.com>
> > Cc: "Liang, Kan" <kan.liang@...ux.intel.com>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: Borislav Petkov <bp@...en8.de>
> > Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> > Cc: "H. Peter Anvin" <hpa@...or.com>
> > Cc: x86@...nel.org
> > Cc: linux-perf-users@...r.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@...ux.intel.com>
Reviewed-by: Ian Rogers <irogers@...gle.com>
Thanks,
Ian
Powered by blists - more mailing lists