dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oak Zeng <Oak.Zeng@amd.com>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: Oak Zeng <Oak.Zeng@amd.com>
Subject: [PATCH 2/2] drm/amdgpu: fix a few compiler warnings
Date: Wed, 10 Mar 2021 21:29:04 -0600	[thread overview]
Message-ID: <1615433344-16267-2-git-send-email-Oak.Zeng@amd.com> (raw)
In-Reply-To: <1615433344-16267-1-git-send-email-Oak.Zeng@amd.com>

1. make function mmhub_v1_7_setup_vm_pt_regs static
2. indent a if statement

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
index 3b4193c..8fca72e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
@@ -88,14 +88,14 @@ int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev)
 		adev->gmc.xgmi.num_physical_nodes = max_region + 1;
 
 		if (adev->gmc.xgmi.num_physical_nodes > max_num_physical_nodes)
-		return -EINVAL;
+			return -EINVAL;
 
 		adev->gmc.xgmi.physical_node_id =
 		REG_GET_FIELD(xgmi_lfb_cntl, MC_VM_XGMI_LFB_CNTL,
 			      PF_LFB_REGION);
 
 		if (adev->gmc.xgmi.physical_node_id > max_physical_node_id)
-		return -EINVAL;
+			return -EINVAL;
 
 		adev->gmc.xgmi.node_segment_size = seg_size;
 	}
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
index ac74d66..29d7f50 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
@@ -53,7 +53,7 @@ static u64 mmhub_v1_7_get_fb_location(struct amdgpu_device *adev)
 	return base;
 }
 
-void mmhub_v1_7_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+static void mmhub_v1_7_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
 				uint64_t page_table_base)
 {
 	struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_MMHUB_0];
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-03-11  3:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  3:29 [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390 Oak Zeng
2021-03-11  3:29 ` Oak Zeng [this message]
2021-03-11 18:19   ` [PATCH 2/2] drm/amdgpu: fix a few compiler warnings Bhardwaj, Rajneesh
2021-03-11  8:54 ` [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390 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=1615433344-16267-2-git-send-email-Oak.Zeng@amd.com \
    --to=oak.zeng@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox