From: "Christian König" <christian.koenig@amd.com>
To: Jingyu Wang <jingyuwang_vip@163.com>,
alexander.deucher@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie,
daniel@ffwll.ch, Hawking.Zhang@amd.com, ray.huang@amd.com,
Jack.Xiao@amd.com, guchun.chen@amd.com, Likun.Gao@amd.com,
en.brown@intel.com
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amdgpu: cleanup coding style in amdgpu_fence.c
Date: Mon, 5 Sep 2022 08:08:19 +0200 [thread overview]
Message-ID: <cf064610-2615-1dcd-0f47-9413f0d648b0@amd.com> (raw)
In-Reply-To: <20220904193132.15446-1-jingyuwang_vip@163.com>
Am 04.09.22 um 21:31 schrieb Jingyu Wang:
> Fix everything checkpatch.pl complained about in amdgpu_fence.c
>
> Signed-off-by: Jingyu Wang <jingyuwang_vip@163.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index 8adeb7469f1e..ae9daf653ad3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: MIT
> /*
> * Copyright 2009 Jerome Glisse.
> * All Rights Reserved.
> @@ -42,7 +43,6 @@
> #include "amdgpu_reset.h"
>
> /*
> - * Fences
> * Fences mark an event in the GPUs pipeline and are used
> * for GPU/CPU synchronization. When the fence is written,
> * it is expected that all buffers associated with that fence
> @@ -139,7 +139,7 @@ static u32 amdgpu_fence_read(struct amdgpu_ring *ring)
> * Returns 0 on success, -ENOMEM on failure.
> */
> int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f, struct amdgpu_job *job,
> - unsigned flags)
> + unsigned int flags)
> {
> struct amdgpu_device *adev = ring->adev;
> struct dma_fence *fence;
> @@ -173,8 +173,7 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f, struct amd
> adev->fence_context + ring->idx, seq);
> /* Against remove in amdgpu_job_{free, free_cb} */
> dma_fence_get(fence);
> - }
> - else
> + } else
That will still be complained about. This should be "} else {".
Apart from this nit pick you patches look good to me now.
Thanks,
Christian.
> dma_fence_init(fence, &amdgpu_fence_ops,
> &ring->fence_drv.lock,
> adev->fence_context + ring->idx, seq);
> @@ -393,7 +392,7 @@ signed long amdgpu_fence_wait_polling(struct amdgpu_ring *ring,
> * Returns the number of emitted fences on the ring. Used by the
> * dynpm code to ring track activity.
> */
> -unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring)
> +unsigned int amdgpu_fence_count_emitted(struct amdgpu_ring *ring)
> {
> uint64_t emitted;
>
> @@ -422,7 +421,7 @@ unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring)
> */
> int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
> struct amdgpu_irq_src *irq_src,
> - unsigned irq_type)
> + unsigned int irq_type)
> {
> struct amdgpu_device *adev = ring->adev;
> uint64_t index;
> @@ -594,6 +593,7 @@ void amdgpu_fence_driver_hw_init(struct amdgpu_device *adev)
>
> for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
> struct amdgpu_ring *ring = adev->rings[i];
> +
> if (!ring || !ring->fence_drv.initialized)
> continue;
>
> @@ -772,6 +772,7 @@ static int amdgpu_debugfs_fence_info_show(struct seq_file *m, void *unused)
>
> for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
> struct amdgpu_ring *ring = adev->rings[i];
> +
> if (!ring || !ring->fence_drv.initialized)
> continue;
>
> @@ -845,6 +846,7 @@ static void amdgpu_debugfs_reset_work(struct work_struct *work)
> reset_work);
>
> struct amdgpu_reset_context reset_context;
> +
> memset(&reset_context, 0, sizeof(reset_context));
>
> reset_context.method = AMD_RESET_METHOD_NONE;
>
> base-commit: e47eb90a0a9ae20b82635b9b99a8d0979b757ad8
> prerequisite-patch-id: f039528bc88876d6e0f64e843da089e85f6d3f58
prev parent reply other threads:[~2022-09-05 6:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 19:31 Jingyu Wang
2022-09-05 6:08 ` 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=cf064610-2615-1dcd-0f47-9413f0d648b0@amd.com \
--to=christian.koenig@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=Jack.Xiao@amd.com \
--cc=Likun.Gao@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=en.brown@intel.com \
--cc=guchun.chen@amd.com \
--cc=jingyuwang_vip@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ray.huang@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®