* [PATCH] gpu: drm: amd: amdgpu: Fixed a few warnings
@ 2021-08-21 8:21 Liviu Cheru
2021-08-23 14:34 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Liviu Cheru @ 2021-08-21 8:21 UTC (permalink / raw)
To: airlied; +Cc: alexander.deucher, amd-gfx, dri-devel, linux-kernel, liviu.cheru
Fixed warnings regarding SPDX license, using "unsigned" instead
of "unsigned int", wrong function parameter name for the
documentation and a space between the function name and "(".
Signed-off-by: Liviu Cheru <liviu.cheru@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 795fa7445abe..af1abb281c6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2009 Jerome Glisse.
* All Rights Reserved.
@@ -129,7 +130,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
u32 c = 0;
if (domain & AMDGPU_GEM_DOMAIN_VRAM) {
- unsigned visible_pfn = adev->gmc.visible_vram_size >> PAGE_SHIFT;
+ unsigned int visible_pfn = adev->gmc.visible_vram_size >> PAGE_SHIFT;
places[c].fpfn = 0;
places[c].lpfn = 0;
@@ -731,7 +732,7 @@ int amdgpu_bo_validate(struct amdgpu_bo *bo)
/**
* amdgpu_bo_add_to_shadow_list - add a BO to the shadow list
*
- * @bo: BO that will be inserted into the shadow list
+ * @vmbo: BO that will be inserted into the shadow list
*
* Insert a BO to the shadow list.
*/
@@ -957,7 +958,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
bo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
amdgpu_bo_placement_from_domain(bo, domain);
for (i = 0; i < bo->placement.num_placement; i++) {
- unsigned fpfn, lpfn;
+ unsigned int fpfn, lpfn;
fpfn = min_offset >> PAGE_SHIFT;
lpfn = max_offset >> PAGE_SHIFT;
@@ -1175,7 +1176,7 @@ void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags)
* Returns:
* 0 for success or a negative error code on failure.
*/
-int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
+int amdgpu_bo_set_metadata(struct amdgpu_bo *bo, void *metadata,
uint32_t metadata_size, uint64_t flags)
{
struct amdgpu_bo_user *ubo;
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpu: drm: amd: amdgpu: Fixed a few warnings
2021-08-21 8:21 [PATCH] gpu: drm: amd: amdgpu: Fixed a few warnings Liviu Cheru
@ 2021-08-23 14:34 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2021-08-23 14:34 UTC (permalink / raw)
To: Liviu Cheru
Cc: Dave Airlie, Deucher, Alexander, amd-gfx list,
Maling list - DRI developers, LKML, liviu.cheru
On Sat, Aug 21, 2021 at 4:46 AM Liviu Cheru <liviucheru@gmail.com> wrote:
>
> Fixed warnings regarding SPDX license, using "unsigned" instead
> of "unsigned int", wrong function parameter name for the
> documentation and a space between the function name and "(".
>
In general, please split these up by the type of change.
> Signed-off-by: Liviu Cheru <liviu.cheru@gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 795fa7445abe..af1abb281c6d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
The license is MIT not GPL. See the actual license on the file.
> /*
> * Copyright 2009 Jerome Glisse.
> * All Rights Reserved.
> @@ -129,7 +130,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
> u32 c = 0;
>
> if (domain & AMDGPU_GEM_DOMAIN_VRAM) {
> - unsigned visible_pfn = adev->gmc.visible_vram_size >> PAGE_SHIFT;
> + unsigned int visible_pfn = adev->gmc.visible_vram_size >> PAGE_SHIFT;
>
> places[c].fpfn = 0;
> places[c].lpfn = 0;
> @@ -731,7 +732,7 @@ int amdgpu_bo_validate(struct amdgpu_bo *bo)
> /**
> * amdgpu_bo_add_to_shadow_list - add a BO to the shadow list
> *
> - * @bo: BO that will be inserted into the shadow list
> + * @vmbo: BO that will be inserted into the shadow list
> *
> * Insert a BO to the shadow list.
> */
This code has already been fixed.
> @@ -957,7 +958,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
> bo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
> amdgpu_bo_placement_from_domain(bo, domain);
> for (i = 0; i < bo->placement.num_placement; i++) {
> - unsigned fpfn, lpfn;
> + unsigned int fpfn, lpfn;
>
> fpfn = min_offset >> PAGE_SHIFT;
> lpfn = max_offset >> PAGE_SHIFT;
> @@ -1175,7 +1176,7 @@ void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags)
> * Returns:
> * 0 for success or a negative error code on failure.
> */
> -int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
> +int amdgpu_bo_set_metadata(struct amdgpu_bo *bo, void *metadata,
> uint32_t metadata_size, uint64_t flags)
> {
> struct amdgpu_bo_user *ubo;
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-23 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 8:21 [PATCH] gpu: drm: amd: amdgpu: Fixed a few warnings Liviu Cheru
2021-08-23 14:34 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).