drm/vmwgfx: remove unused vmw_overlay function

Message ID 20230321182414.1826372-1-trix@redhat.com
State New
Headers
Series drm/vmwgfx: remove unused vmw_overlay function |

Commit Message

Tom Rix March 21, 2023, 6:24 p.m. UTC
  clang with W=1 reports
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:56:35: error:
  unused function 'vmw_overlay' [-Werror,-Wunused-function]
static inline struct vmw_overlay *vmw_overlay(struct drm_device *dev)
                                  ^
This function is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 6 ------
 1 file changed, 6 deletions(-)
  

Comments

Nick Desaulniers April 7, 2023, 5:40 p.m. UTC | #1
On Tue, Mar 21, 2023 at 11:24 AM Tom Rix <trix@redhat.com> wrote:
>
> clang with W=1 reports
> drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:56:35: error:
>   unused function 'vmw_overlay' [-Werror,-Wunused-function]
> static inline struct vmw_overlay *vmw_overlay(struct drm_device *dev)
>                                   ^
> This function is not used, so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
> index 8d171d71cb8a..7e112319a23c 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
> @@ -53,12 +53,6 @@ struct vmw_overlay {
>         struct vmw_stream stream[VMW_MAX_NUM_STREAMS];
>  };
>
> -static inline struct vmw_overlay *vmw_overlay(struct drm_device *dev)
> -{
> -       struct vmw_private *dev_priv = vmw_priv(dev);
> -       return dev_priv ? dev_priv->overlay_priv : NULL;
> -}
> -
>  struct vmw_escape_header {
>         uint32_t cmd;
>         SVGAFifoCmdEscape body;
> --
> 2.27.0
>
  
Zack Rusin April 11, 2023, 5:54 p.m. UTC | #2
On Tue, 2023-03-21 at 14:24 -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:56:35: error:
>   unused function 'vmw_overlay' [-Werror,-Wunused-function]
> static inline struct vmw_overlay *vmw_overlay(struct drm_device *dev)
>                                   ^
> This function is not used, so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Thank you for the patch. I went ahead and pushed it to the drm-misc-next branch in
drm-misc tree.

z
  

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
index 8d171d71cb8a..7e112319a23c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
@@ -53,12 +53,6 @@  struct vmw_overlay {
 	struct vmw_stream stream[VMW_MAX_NUM_STREAMS];
 };
 
-static inline struct vmw_overlay *vmw_overlay(struct drm_device *dev)
-{
-	struct vmw_private *dev_priv = vmw_priv(dev);
-	return dev_priv ? dev_priv->overlay_priv : NULL;
-}
-
 struct vmw_escape_header {
 	uint32_t cmd;
 	SVGAFifoCmdEscape body;