lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support
On Fri, May 15, 2020 at 02:57:33PM -0700, Stephane Eranian wrote:

> +static struct perf_msr amd_rapl_msrs[] = {
> + [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, NULL},
> + [PERF_RAPL_PKG] = { MSR_AMD_PKG_ENERGY_STATUS, &rapl_events_pkg_group, test_msr },
> + [PERF_RAPL_RAM] = { 0, &rapl_events_ram_group, NULL},
> + [PERF_RAPL_PP1] = { 0, &rapl_events_gpu_group, NULL},
> + [PERF_RAPL_PSYS] = { 0, &rapl_events_psys_group, NULL},
> +};

Why have those !PKG things initialized? Wouldn't they default to 0
anyway? If not, surely { 0, } is sufficient.

\
 
 \ /
  Last update: 2020-05-18 11:35    [W:0.184 / U:1.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site