[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1d154c1-dfdb-9899-8d40-4ff50de80df1@infradead.org>
Date: Tue, 25 Jan 2022 12:29:06 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Colin Ian King <colin.i.king@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>, linux-perf-users@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] perf/x86/rapl: replace 0 with NULL to initialize
pointers
On 1/25/22 12:14, Colin Ian King wrote:
> Pointers should be initialized with NULL rather than zero. Fix these.
> Cleans up sparse warning:
>
> arch/x86/events/rapl.c:540:59: warning: Using plain integer as NULL pointer
also was
Reported-by: kernel test robot <lkp@...el.com>
>
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
> arch/x86/events/rapl.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
> index 77e3a47af5ad..7d70690fded5 100644
> --- a/arch/x86/events/rapl.c
> +++ b/arch/x86/events/rapl.c
> @@ -537,11 +537,11 @@ static struct perf_msr intel_rapl_spr_msrs[] = {
> * - want to use same event codes across both architectures
> */
> static struct perf_msr amd_rapl_msrs[] = {
> - [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, 0, false, 0 },
> + [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, NULL, false, 0 },
> [PERF_RAPL_PKG] = { MSR_AMD_PKG_ENERGY_STATUS, &rapl_events_pkg_group, test_msr, false, RAPL_MSR_MASK },
> - [PERF_RAPL_RAM] = { 0, &rapl_events_ram_group, 0, false, 0 },
> - [PERF_RAPL_PP1] = { 0, &rapl_events_gpu_group, 0, false, 0 },
> - [PERF_RAPL_PSYS] = { 0, &rapl_events_psys_group, 0, false, 0 },
> + [PERF_RAPL_RAM] = { 0, &rapl_events_ram_group, NULL, false, 0 },
> + [PERF_RAPL_PP1] = { 0, &rapl_events_gpu_group, NULL, false, 0 },
> + [PERF_RAPL_PSYS] = { 0, &rapl_events_psys_group, NULL, false, 0 },
> };
>
> static int rapl_cpu_offline(unsigned int cpu)
--
~Randy
Powered by blists - more mailing lists