2022-09-26 07:24:30

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH 2/2] drm/i915/gvt: Remove the unused function get_pt_type()

The function get_pt_type is defined in the gtt.c file, but not
called elsewhere, so delete this unused function.

drivers/gpu/drm/i915/gvt/gtt.c:285:19: warning: unused function 'get_pt_type'.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2277
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/gpu/drm/i915/gvt/gtt.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index ce0eb03709c3..6cd4c1d386a5 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -282,11 +282,6 @@ static inline int get_next_pt_type(int type)
return gtt_type_table[type].next_pt_type;
}

-static inline int get_pt_type(int type)
-{
- return gtt_type_table[type].pt_type;
-}
-
static inline int get_entry_type(int type)
{
return gtt_type_table[type].entry_type;
--
2.20.1.7.g153144c


2022-09-26 08:03:16

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH 1/2] drm/i915/gvt: Fix kernel-doc

drivers/gpu/drm/i915/gvt/vgpu.c:356: warning: expecting prototype for intel_gvt_destroy_vgpu(). Prototype was for intel_gvt_destroy_idle_vgpu() instead.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2276
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/gpu/drm/i915/gvt/vgpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
index 5c533fbc2c8d..e081027761d5 100644
--- a/drivers/gpu/drm/i915/gvt/vgpu.c
+++ b/drivers/gpu/drm/i915/gvt/vgpu.c
@@ -346,7 +346,7 @@ struct intel_vgpu *intel_gvt_create_idle_vgpu(struct intel_gvt *gvt)
}

/**
- * intel_gvt_destroy_vgpu - destroy an idle virtual GPU
+ * intel_gvt_destroy_idle_vgpu() - destroy an idle virtual GPU
* @vgpu: virtual GPU
*
* This function is called when user wants to destroy an idle virtual GPU.
--
2.20.1.7.g153144c

2022-11-08 07:52:06

by Zhenyu Wang

[permalink] [raw]
Subject: Re: [PATCH 2/2] drm/i915/gvt: Remove the unused function get_pt_type()

On 2022.09.26 14:40:43 +0800, Jiapeng Chong wrote:
> The function get_pt_type is defined in the gtt.c file, but not
> called elsewhere, so delete this unused function.
>
> drivers/gpu/drm/i915/gvt/gtt.c:285:19: warning: unused function 'get_pt_type'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2277
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>
> ---
> drivers/gpu/drm/i915/gvt/gtt.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
> index ce0eb03709c3..6cd4c1d386a5 100644
> --- a/drivers/gpu/drm/i915/gvt/gtt.c
> +++ b/drivers/gpu/drm/i915/gvt/gtt.c
> @@ -282,11 +282,6 @@ static inline int get_next_pt_type(int type)
> return gtt_type_table[type].next_pt_type;
> }
>
> -static inline int get_pt_type(int type)
> -{
> - return gtt_type_table[type].pt_type;
> -}
> -
> static inline int get_entry_type(int type)
> {
> return gtt_type_table[type].entry_type;
> --
> 2.20.1.7.g153144c
>

Reviewed-by: Zhenyu Wang <[email protected]>

thanks!


Attachments:
(No filename) (1.13 kB)
signature.asc (201.00 B)
Download all attachments