From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/4] drm/amdgpu: Plus NULL function pointer check
Date: Mon, 12 Mar 2018 13:54:59 +0100 [thread overview]
Message-ID: <71e3bf37-5289-422b-7b04-de2d4e60ce9c@gmail.com> (raw)
In-Reply-To: <1520858050-7338-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Am 12.03.2018 um 13:34 schrieb Rex Zhu:
> Change-Id: Ifd6553646e7468bc935504075816074373e1d58d
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 56b2245..d60ecc5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1415,12 +1415,14 @@ static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev)
> if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
> adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE) {
> /* enable clockgating to save power */
> - r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
> + if (adev->ip_blocks[i].version->funcs->set_clockgating_state) {
Why not add it to the if check above?
Christian.
> + r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
> AMD_CG_STATE_GATE);
> - if (r) {
> - DRM_ERROR("set_clockgating_state(gate) of IP block <%s> failed %d\n",
> - adev->ip_blocks[i].version->funcs->name, r);
> - return r;
> + if (r) {
> + DRM_ERROR("set_clockgating_state(gate) of IP block <%s> failed %d\n",
> + adev->ip_blocks[i].version->funcs->name, r);
> + return r;
> + }
> }
> }
> }
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-03-12 12:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 12:34 [PATCH 1/4] drm/amd/pp: Move helper functions to smu_help.c Rex Zhu
[not found] ` <1520858050-7338-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-12 12:34 ` [PATCH 2/4] drm/amdgpu: Plus NULL function pointer check Rex Zhu
[not found] ` <1520858050-7338-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-12 12:54 ` Christian König [this message]
[not found] ` <71e3bf37-5289-422b-7b04-de2d4e60ce9c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-12 14:13 ` Zhu, Rex
2018-03-12 12:34 ` [PATCH 3/4] drm/amdgpu: Remove wrapper layer of amdgpu_powerplay Rex Zhu
[not found] ` <1520858050-7338-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-13 16:02 ` Alex Deucher
2018-03-12 12:34 ` [PATCH 4/4] drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c Rex Zhu
[not found] ` <1520858050-7338-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-13 15:55 ` Alex Deucher
2018-03-13 15:56 ` [PATCH 1/4] drm/amd/pp: Move helper functions to smu_help.c Alex Deucher
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=71e3bf37-5289-422b-7b04-de2d4e60ce9c@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Rex.Zhu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
/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