linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Quan, Evan" <Evan.Quan@amd.com>
To: Nathan Chancellor <natechancellor@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Zhou, David(ChunMing)" <David1.Zhou@amd.com>,
	"Wentland, Harry" <Harry.Wentland@amd.com>,
	"Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
	Rex Zhu <rex.zhu@amd.com>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	"Wang, Kevin(Yang)" <Kevin1.Wang@amd.com>
Subject: RE: [PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels
Date: Tue, 16 Jul 2019 01:00:02 +0000	[thread overview]
Message-ID: <MN2PR12MB3344EFEEA62F1FC0CE238F2CE4CE0@MN2PR12MB3344.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20190715153932.GA41785@archlinux-threadripper>

Thanks!  This is reviewed-by: Evan Quan <evan.quan@amd.com>

Regards
Evan
> -----Original Message-----
> From: Nathan Chancellor <natechancellor@gmail.com>
> Sent: Monday, July 15, 2019 11:40 PM
> To: Arnd Bergmann <arnd@arndb.de>
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Zhou, David(ChunMing)
> <David1.Zhou@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>;
> Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Rex Zhu <rex.zhu@amd.com>;
> Quan, Evan <Evan.Quan@amd.com>; David Airlie <airlied@linux.ie>; Daniel
> Vetter <daniel@ffwll.ch>; amd-gfx list <amd-gfx@lists.freedesktop.org>; dri-
> devel <dri-devel@lists.freedesktop.org>; Linux Kernel Mailing List <linux-
> kernel@vger.kernel.org>; clang-built-linux <clang-built-
> linux@googlegroups.com>; Wang, Kevin(Yang) <Kevin1.Wang@amd.com>
> Subject: Re: [PATCH 6/7] drm/amd/powerplay: Use proper enums in
> vega20_print_clk_levels
> 
> On Mon, Jul 15, 2019 at 11:25:29AM +0200, Arnd Bergmann wrote:
> > On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor
> > <natechancellor@gmail.com> wrote:
> > >
> > > clang warns:
> > >
> > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39:
> warning:
> > > implicit conversion from enumeration type 'PPCLK_e' to different
> > > enumeration type 'enum smu_clk_type' [-Wenum-conversion]
> > >                 ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now);
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
> > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1016:39:
> warning:
> > > implicit conversion from enumeration type 'PPCLK_e' to different
> > > enumeration type 'enum smu_clk_type' [-Wenum-conversion]
> > >                 ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now);
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
> > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1031:39:
> warning:
> > > implicit conversion from enumeration type 'PPCLK_e' to different
> > > enumeration type 'enum smu_clk_type' [-Wenum-conversion]
> > >                 ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now);
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
> > >
> > > The values are mapped one to one in vega20_get_smu_clk_index so just
> > > use the proper enums here.
> > >
> > > Fixes: 096761014227 ("drm/amd/powerplay: support sysfs to get
> > > socclk, fclk, dcefclk")
> > > Link: https://github.com/ClangBuiltLinux/linux/issues/587
> > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > > ---
> >
> > Adding Kevin Wang for further review, as he sent a related patch in
> > d36893362d22 ("drm/amd/powerplay: fix smu clock type change miss
> > error")
> >
> > I assume this one is still required as it triggers the same warning.
> > Kevin, can you have a look?
> >
> >       Arnd
> 
> Indeed, this one and https://github.com/ClangBuiltLinux/linux/issues/586
> are still outstanding.
> 
> https://patchwork.freedesktop.org/patch/315581/
> 
> Cheers,
> Nathan
> 
> >
> > >  drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > index 0f14fe14ecd8..e62dd6919b24 100644
> > > --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> > > @@ -992,7 +992,7 @@ static int vega20_print_clk_levels(struct
> smu_context *smu,
> > >                 break;
> > >
> > >         case SMU_SOCCLK:
> > > -               ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now);
> > > +               ret = smu_get_current_clk_freq(smu, SMU_SOCCLK,
> > > + &now);
> > >                 if (ret) {
> > >                         pr_err("Attempt to get current socclk Failed!");
> > >                         return ret;
> > > @@ -1013,7 +1013,7 @@ static int vega20_print_clk_levels(struct
> smu_context *smu,
> > >                 break;
> > >
> > >         case SMU_FCLK:
> > > -               ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now);
> > > +               ret = smu_get_current_clk_freq(smu, SMU_FCLK, &now);
> > >                 if (ret) {
> > >                         pr_err("Attempt to get current fclk Failed!");
> > >                         return ret;
> > > @@ -1028,7 +1028,7 @@ static int vega20_print_clk_levels(struct
> smu_context *smu,
> > >                 break;
> > >
> > >         case SMU_DCEFCLK:
> > > -               ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now);
> > > +               ret = smu_get_current_clk_freq(smu, SMU_DCEFCLK,
> > > + &now);
> > >                 if (ret) {
> > >                         pr_err("Attempt to get current dcefclk Failed!");
> > >                         return ret;

  reply	other threads:[~2019-07-16  1:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04  5:52 [PATCH 0/7] amdgpu clang warning fixes on next-20190703 Nathan Chancellor
2019-07-04  5:52 ` [PATCH 1/7] drm/amdgpu/mes10.1: Fix header guard Nathan Chancellor
2019-07-08 20:24   ` Arnd Bergmann
2019-07-04  5:52 ` [PATCH 2/7] drm/amd/powerplay: Use memset to initialize metrics structs Nathan Chancellor
2019-07-04  5:52 ` [PATCH 3/7] drm/amd/powerplay: Use proper enums in smu_adjust_power_state_dynamic Nathan Chancellor
2019-07-04  5:52 ` [PATCH 4/7] drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq Nathan Chancellor
2019-07-04  5:52 ` [PATCH 5/7] drm/amd/display: Use proper enum conversion functions Nathan Chancellor
2019-07-09 18:51   ` Arnd Bergmann
2019-07-09 20:21     ` Nathan Chancellor
2019-07-19  3:16   ` Nathan Chancellor
2019-07-25 16:00     ` Li, Sun peng (Leo)
2019-07-25 16:14       ` Kazlauskas, Nicholas
2019-07-25 17:26         ` Li, Sun peng (Leo)
2019-07-04  5:52 ` [PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels Nathan Chancellor
2019-07-15  9:25   ` Arnd Bergmann
2019-07-15 15:39     ` Nathan Chancellor
2019-07-16  1:00       ` Quan, Evan [this message]
2019-07-04  5:52 ` [PATCH 7/7] drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent Nathan Chancellor
2019-07-08 15:55 ` [PATCH 0/7] amdgpu clang warning fixes on next-20190703 Alex Deucher
2019-07-09  7:22   ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR12MB3344EFEEA62F1FC0CE238F2CE4CE0@MN2PR12MB3344.namprd12.prod.outlook.com \
    --to=evan.quan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Kevin1.Wang@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=airlied@linux.ie \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=arnd@arndb.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=rex.zhu@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).