All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Cai Huoqing <caihuoqing@baidu.com>,
	alexander.deucher@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie,
	daniel@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: Make use of the helper macro SET_RUNTIME_PM_OPS()
Date: Mon, 30 Aug 2021 14:51:19 +0200	[thread overview]
Message-ID: <18719622-d60a-c73a-512d-defbf182d3d7@amd.com> (raw)
In-Reply-To: <20210828085052.756-1-caihuoqing@baidu.com>

Am 28.08.21 um 10:50 schrieb Cai Huoqing:
> Use the helper macro SET_RUNTIME_PM_OPS() instead of the verbose
> operators ".runtime_suspend/.runtime_resume/.runtime_idle", because
> the SET_RUNTIME_PM_OPS() is a nice helper macro that could be brought
> in to make code a little clearer, a little more concise.

To be honest I don't think that this is cleaner at all.

Christian.

>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>   drivers/gpu/drm/radeon/radeon_drv.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index b74cebca1f89..c2eb725e87f6 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -529,15 +529,14 @@ static long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigne
>   #endif
>   
>   static const struct dev_pm_ops radeon_pm_ops = {
> +	SET_RUNTIME_PM_OPS(radeon_pmops_runtime_suspend,
> +			   radeon_pmops_runtime_resume, radeon_pmops_runtime_idle)
>   	.suspend = radeon_pmops_suspend,
>   	.resume = radeon_pmops_resume,
>   	.freeze = radeon_pmops_freeze,
>   	.thaw = radeon_pmops_thaw,
>   	.poweroff = radeon_pmops_freeze,
>   	.restore = radeon_pmops_resume,
> -	.runtime_suspend = radeon_pmops_runtime_suspend,
> -	.runtime_resume = radeon_pmops_runtime_resume,
> -	.runtime_idle = radeon_pmops_runtime_idle,
>   };
>   
>   static const struct file_operations radeon_driver_kms_fops = {


      parent reply	other threads:[~2021-08-30 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28  8:50 [PATCH] drm/radeon: Make use of the helper macro SET_RUNTIME_PM_OPS() Cai Huoqing
2021-08-30 12:21 ` Alex Deucher
2021-08-30 12:44   ` Cai Huoqing
2021-08-30 12:51 ` Christian König [this message]

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=18719622-d60a-c73a-512d-defbf182d3d7@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=caihuoqing@baidu.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.