diff mbox series

[05/11] drm/msm/dpu: Remove unused functions

Message ID 20181105233103.7657-6-jcrouse@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series DPU cleanups | expand

Commit Message

Jordan Crouse Nov. 5, 2018, 11:30 p.m. UTC
Remove some unused container_of() helper functions.

v2: Retained still used helper functions in the name of readability

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h     | 10 ----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 10 ----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h     | 10 ----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h      | 10 ----------
 4 files changed, 40 deletions(-)

Comments

Sean Paul Nov. 6, 2018, 2:31 p.m. UTC | #1
On Mon, Nov 05, 2018 at 04:30:57PM -0700, Jordan Crouse wrote:
> Remove some unused container_of() helper functions.
> 
> v2: Retained still used helper functions in the name of readability
> 
> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h     | 10 ----------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 10 ----------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h     | 10 ----------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h      | 10 ----------
>  4 files changed, 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
> index 3b77df460dea..a2b0dbc23058 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
> @@ -91,16 +91,6 @@ struct dpu_hw_intf {
>  	struct dpu_hw_intf_ops ops;
>  };
>  
> -/**
> - * to_dpu_hw_intf - convert base object dpu_hw_base to container
> - * @hw: Pointer to base hardware block
> - * return: Pointer to hardware block container
> - */
> -static inline struct dpu_hw_intf *to_dpu_hw_intf(struct dpu_hw_blk *hw)
> -{
> -	return container_of(hw, struct dpu_hw_intf, base);
> -}
> -
>  /**
>   * dpu_hw_intf_init(): Initializes the intf driver for the passed
>   * interface idx.
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
> index 3caccd7d6a3e..0e02e43cee14 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
> @@ -104,16 +104,6 @@ struct dpu_hw_pingpong {
>  	struct dpu_hw_pingpong_ops ops;
>  };
>  
> -/**
> - * dpu_hw_pingpong - convert base object dpu_hw_base to container
> - * @hw: Pointer to base hardware block
> - * return: Pointer to hardware block container
> - */
> -static inline struct dpu_hw_pingpong *to_dpu_hw_pingpong(struct dpu_hw_blk *hw)
> -{
> -	return container_of(hw, struct dpu_hw_pingpong, base);
> -}
> -
>  /**
>   * dpu_hw_pingpong_init - initializes the pingpong driver for the passed
>   *	pingpong idx.
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
> index 4d81e5f5ce1b..119b4e1c16be 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
> @@ -391,16 +391,6 @@ struct dpu_hw_pipe {
>  	struct dpu_hw_sspp_ops ops;
>  };
>  
> -/**
> - * dpu_hw_pipe - convert base object dpu_hw_base to container
> - * @hw: Pointer to base hardware block
> - * return: Pointer to hardware block container
> - */
> -static inline struct dpu_hw_pipe *to_dpu_hw_pipe(struct dpu_hw_blk *hw)
> -{
> -	return container_of(hw, struct dpu_hw_pipe, base);
> -}
> -
>  /**
>   * dpu_hw_sspp_init - initializes the sspp hw driver object.
>   * Should be called once before accessing every pipe.
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
> index 192e338f20bb..aa21fd834398 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
> @@ -160,16 +160,6 @@ struct dpu_hw_mdp {
>  	struct dpu_hw_mdp_ops ops;
>  };
>  
> -/**
> - * to_dpu_hw_mdp - convert base object dpu_hw_base to container
> - * @hw: Pointer to base hardware block
> - * return: Pointer to hardware block container
> - */
> -static inline struct dpu_hw_mdp *to_dpu_hw_mdp(struct dpu_hw_blk *hw)
> -{
> -	return container_of(hw, struct dpu_hw_mdp, base);
> -}
> -
>  /**
>   * dpu_hw_mdptop_init - initializes the top driver for the passed idx
>   * @idx:  Interface index for which driver object is required
> -- 
> 2.18.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
index 3b77df460dea..a2b0dbc23058 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
@@ -91,16 +91,6 @@  struct dpu_hw_intf {
 	struct dpu_hw_intf_ops ops;
 };
 
-/**
- * to_dpu_hw_intf - convert base object dpu_hw_base to container
- * @hw: Pointer to base hardware block
- * return: Pointer to hardware block container
- */
-static inline struct dpu_hw_intf *to_dpu_hw_intf(struct dpu_hw_blk *hw)
-{
-	return container_of(hw, struct dpu_hw_intf, base);
-}
-
 /**
  * dpu_hw_intf_init(): Initializes the intf driver for the passed
  * interface idx.
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
index 3caccd7d6a3e..0e02e43cee14 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
@@ -104,16 +104,6 @@  struct dpu_hw_pingpong {
 	struct dpu_hw_pingpong_ops ops;
 };
 
-/**
- * dpu_hw_pingpong - convert base object dpu_hw_base to container
- * @hw: Pointer to base hardware block
- * return: Pointer to hardware block container
- */
-static inline struct dpu_hw_pingpong *to_dpu_hw_pingpong(struct dpu_hw_blk *hw)
-{
-	return container_of(hw, struct dpu_hw_pingpong, base);
-}
-
 /**
  * dpu_hw_pingpong_init - initializes the pingpong driver for the passed
  *	pingpong idx.
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
index 4d81e5f5ce1b..119b4e1c16be 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
@@ -391,16 +391,6 @@  struct dpu_hw_pipe {
 	struct dpu_hw_sspp_ops ops;
 };
 
-/**
- * dpu_hw_pipe - convert base object dpu_hw_base to container
- * @hw: Pointer to base hardware block
- * return: Pointer to hardware block container
- */
-static inline struct dpu_hw_pipe *to_dpu_hw_pipe(struct dpu_hw_blk *hw)
-{
-	return container_of(hw, struct dpu_hw_pipe, base);
-}
-
 /**
  * dpu_hw_sspp_init - initializes the sspp hw driver object.
  * Should be called once before accessing every pipe.
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
index 192e338f20bb..aa21fd834398 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h
@@ -160,16 +160,6 @@  struct dpu_hw_mdp {
 	struct dpu_hw_mdp_ops ops;
 };
 
-/**
- * to_dpu_hw_mdp - convert base object dpu_hw_base to container
- * @hw: Pointer to base hardware block
- * return: Pointer to hardware block container
- */
-static inline struct dpu_hw_mdp *to_dpu_hw_mdp(struct dpu_hw_blk *hw)
-{
-	return container_of(hw, struct dpu_hw_mdp, base);
-}
-
 /**
  * dpu_hw_mdptop_init - initializes the top driver for the passed idx
  * @idx:  Interface index for which driver object is required