All of lore.kernel.org
 help / color / mirror / Atom feed
From: yipechai <YiPeng.Chai@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Tao.Zhou1@amd.com, Hawking.Zhang@amd.com, John.Clements@amd.com,
	yipechai <YiPeng.Chai@amd.com>,
	yipechai@amd.com
Subject: [PATCH V2 4/5] drm/amdgpu: Fix the code style warnings in sdma
Date: Fri, 14 Jan 2022 13:34:06 +0800	[thread overview]
Message-ID: <20220114053407.4035049-4-YiPeng.Chai@amd.com> (raw)
In-Reply-To: <20220114053407.4035049-1-YiPeng.Chai@amd.com>

Fix the code style warnings in sdma:
1. WARNING: Missing a blank line after declarations.
2. ERROR: that open brace { should be on the previous line.
3. WARNING: unnecessary whitespace before a quoted newline.
4. ERROR: space required after that ',' (ctx:VxV).

Signed-off-by: yipechai <YiPeng.Chai@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++----
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 3c1483dc113e..06a7ceda4c87 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2766,10 +2766,10 @@ static int sdma_v4_0_query_ras_error_count_by_instance(struct amdgpu_device *ade
 static void sdma_v4_0_query_ras_error_count(struct amdgpu_device *adev,  void *ras_error_status)
 {
 	int i = 0;
+
 	for (i = 0; i < adev->sdma.num_instances; i++) {
-		if (sdma_v4_0_query_ras_error_count_by_instance(adev, i, ras_error_status))
-		{
-			dev_err(adev->dev, "Query ras error count failed in SDMA%d \n", i);
+		if (sdma_v4_0_query_ras_error_count_by_instance(adev, i, ras_error_status)) {
+			dev_err(adev->dev, "Query ras error count failed in SDMA%d\n", i);
 			return;
 		}
 	}
@@ -2814,7 +2814,7 @@ static void sdma_v4_0_set_ras_funcs(struct amdgpu_device *adev)
 	if (adev->sdma.ras) {
 		amdgpu_ras_register_ras_block(adev, &adev->sdma.ras->ras_block);
 
-		strcpy(adev->sdma.ras->ras_block.name,"sdma");
+		strcpy(adev->sdma.ras->ras_block.name, "sdma");
 		adev->sdma.ras->ras_block.block = AMDGPU_RAS_BLOCK__SDMA;
 
 		/* If don't define special ras_late_init function, use default ras_late_init */
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c
index 5c1ba1116e5c..6f9895cdddb1 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c
@@ -248,10 +248,10 @@ static void sdma_v4_4_reset_ras_error_count(struct amdgpu_device *adev)
 static void sdma_v4_4_query_ras_error_count(struct amdgpu_device *adev,  void *ras_error_status)
 {
 	int i = 0;
+
 	for (i = 0; i < adev->sdma.num_instances; i++) {
-		if (sdma_v4_4_query_ras_error_count_by_instance(adev, i, ras_error_status))
-		{
-			dev_err(adev->dev, "Query ras error count failed in SDMA%d \n", i);
+		if (sdma_v4_4_query_ras_error_count_by_instance(adev, i, ras_error_status)) {
+			dev_err(adev->dev, "Query ras error count failed in SDMA%d\n", i);
 			return;
 		}
 	}
-- 
2.25.1


  parent reply	other threads:[~2022-01-14  5:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14  5:34 [PATCH V2 1/5] drm/amdgpu: Fix the code style warnings in amdgpu_ras yipechai
2022-01-14  5:34 ` [PATCH V2 2/5] drm/amdgpu: Fix the code style warnings in gfx yipechai
2022-01-14  5:34 ` [PATCH V2 3/5] drm/amdgpu: Fix the code style warnings in gmc yipechai
2022-01-14  5:34 ` yipechai [this message]
2022-01-14  5:34 ` [PATCH V2 5/5] drm/amdgpu: Fix the code style warnings in hdp xgmi mca and umc yipechai
2022-01-14  6:44 ` [PATCH V2 1/5] drm/amdgpu: Fix the code style warnings in amdgpu_ras Zhou1, Tao
2022-01-14  7:19   ` Christian König

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=20220114053407.4035049-4-YiPeng.Chai@amd.com \
    --to=yipeng.chai@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=John.Clements@amd.com \
    --cc=Tao.Zhou1@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=yipechai@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 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.