mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Bernard Zhao <bernard@vivo.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Evan Quan <evan.quan@amd.com>,
	Luben Tuikov <luben.tuikov@amd.com>,
	Xiaojie Yuan <xiaojie.yuan@amd.com>,
	Changfeng <Changfeng.Zhu@amd.com>,
	Dave Airlie <airlied@redhat.com>,
	Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH] drm/amd: move DRM_ERROR log out of the mutex protect area
Date: Mon, 2 Nov 2020 16:03:47 +0100	[thread overview]
Message-ID: <70145097-6157-dc62-3da6-3ba0b6cadb82@amd.com> (raw)
In-Reply-To: <20201102031423.4033-1-bernard@vivo.com>

Am 02.11.20 um 04:14 schrieb Bernard Zhao:
> In function amdgpu_register_gpu_instance, there is no need to
> protect DRM_ERROR in mutex mgpu_info.mutex.
> This change is to make the code to run a bit fast.

NAK, performance for an error path in module load is pretty much irrelevant.

This just looks like a random unnecessary code change to me.

Regards,
Christian.

>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index efda38349a03..cc61b0a5b8d1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -104,8 +104,8 @@ void amdgpu_register_gpu_instance(struct amdgpu_device *adev)
>   	mutex_lock(&mgpu_info.mutex);
>   
>   	if (mgpu_info.num_gpu >= MAX_GPU_INSTANCE) {
> -		DRM_ERROR("Cannot register more gpu instance\n");
>   		mutex_unlock(&mgpu_info.mutex);
> +		DRM_ERROR("Cannot register more gpu instance\n");
>   		return;
>   	}
>   


      reply	other threads:[~2020-11-02 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02  3:14 Bernard Zhao
2020-11-02 15:03 ` 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=70145097-6157-dc62-3da6-3ba0b6cadb82@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Changfeng.Zhu@amd.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bernard@vivo.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=evan.quan@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luben.tuikov@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=opensource.kernel@vivo.com \
    --cc=tzimmermann@suse.de \
    --cc=xiaojie.yuan@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

all inboxes | Powered by JetHome®