[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iwN-3TyX6A4VuX4EXwD9o04hHxm4T3=XaBg2hXPXev4g@mail.gmail.com>
Date: Mon, 3 Apr 2023 19:51:31 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: "Zhang, Rui" <rui.zhang@...el.com>
Cc: "rafael@...nel.org" <rafael@...nel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Pandruvada, Srinivas" <srinivas.pandruvada@...el.com>
Subject: Re: [PATCH 04/15] powercap/intel_rapl: Support per Interface
primitive information
On Sun, Apr 2, 2023 at 9:43 AM Zhang, Rui <rui.zhang@...el.com> wrote:
>
> On Thu, 2023-03-30 at 19:56 +0200, Rafael J. Wysocki wrote:
> > On Thu, Mar 16, 2023 at 4:42 PM Zhang Rui <rui.zhang@...el.com>
> > wrote:
> > > RAPL primitive information is Interface specific.
> > >
> > > Although current MSR and MMIO Interface share the same RAPL
> > > primitives,
> > > new Interface like TPMI has its own RAPL primitive information.
> > >
> > > Save the primitive information in the Interface private structure.
> > >
> > > Plus, using variant name "rp" for struct rapl_primitive_info is
> > > confusing because "rp" is also used for struct rapl_package.
> > > Use "rpi" as the variant name for struct rapl_primitive_info, and
> > > rename
> > > the previous rpi[] array to avoid conflict.
> > >
> > > No functional change.
> > >
> > > Signed-off-by: Zhang Rui <rui.zhang@...el.com>
> > > ---
> > > drivers/powercap/intel_rapl_common.c | 50 ++++++++++++++++++----
> > > ------
> > > include/linux/intel_rapl.h | 2 ++
> > > 2 files changed, 35 insertions(+), 17 deletions(-)
> > >
> > > diff --git a/drivers/powercap/intel_rapl_common.c
> > > b/drivers/powercap/intel_rapl_common.c
> > > index 56e8af2a1e6f..898238285188 100644
> > > --- a/drivers/powercap/intel_rapl_common.c
> > > +++ b/drivers/powercap/intel_rapl_common.c
> > > @@ -654,7 +654,7 @@ static u64 rapl_unit_xlate(struct rapl_domain
> > > *rd, enum unit_type type,
> > > }
> > >
> > > /* in the order of enum rapl_primitives */
> > > -static struct rapl_primitive_info rpi[] = {
> > > +static struct rapl_primitive_info rpis_default[] = {
> >
> > What does the 's' in the name stand for?
>
> 'rpi' stands for rapl_primitive_info, so I use 'rpis' for a series of
> rapl_primitive_info.
I would call it rpi_default[] (without the 's'), because the "array"
part is implied by its definition, so the plural is not really
necessary.
Powered by blists - more mailing lists