diff mbox

[v2,01/15] media: s5p-mfc: Remove unused structures and dead code

Message ID 1487597944-2000-2-git-send-email-m.szyprowski@samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Marek Szyprowski Feb. 20, 2017, 1:38 p.m. UTC
Remove unused structures, definitions and functions that are no longer
called from the driver code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c        | 21 ---------------------
 drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 13 -------------
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h   |  1 -
 3 files changed, 35 deletions(-)

Comments

Andrzej Hajda Feb. 21, 2017, 11:11 a.m. UTC | #1
On 20.02.2017 14:38, Marek Szyprowski wrote:
> Remove unused structures, definitions and functions that are no longer
> called from the driver code.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>

For the whole patchset:

Acked-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej


> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c        | 21 ---------------------
>  drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 13 -------------
>  drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h   |  1 -
>  3 files changed, 35 deletions(-)
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index 05fe82be6584..3e1f22eb4339 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -1422,16 +1422,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v5,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v5 = {
> -	.base = MFC_BASE_ALIGN_ORDER,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v5 = {
>  	.version	= MFC_VERSION,
>  	.version_bit	= MFC_V5_BIT,
>  	.port_num	= MFC_NUM_PORTS,
>  	.buf_size	= &buf_size_v5,
> -	.buf_align	= &mfc_buf_align_v5,
>  	.fw_name[0]	= "s5p-mfc.fw",
>  	.clk_names	= {"mfc", "sclk_mfc"},
>  	.num_clocks	= 2,
> @@ -1452,16 +1447,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v6,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v6 = {
> -	.base = 0,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v6 = {
>  	.version	= MFC_VERSION_V6,
>  	.version_bit	= MFC_V6_BIT,
>  	.port_num	= MFC_NUM_PORTS_V6,
>  	.buf_size	= &buf_size_v6,
> -	.buf_align	= &mfc_buf_align_v6,
>  	.fw_name[0]     = "s5p-mfc-v6.fw",
>  	/*
>  	 * v6-v2 firmware contains bug fixes and interface change
> @@ -1486,16 +1476,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v7,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v7 = {
> -	.base = 0,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v7 = {
>  	.version	= MFC_VERSION_V7,
>  	.version_bit	= MFC_V7_BIT,
>  	.port_num	= MFC_NUM_PORTS_V7,
>  	.buf_size	= &buf_size_v7,
> -	.buf_align	= &mfc_buf_align_v7,
>  	.fw_name[0]     = "s5p-mfc-v7.fw",
>  	.clk_names	= {"mfc", "sclk_mfc"},
>  	.num_clocks	= 2,
> @@ -1515,16 +1500,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v8,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v8 = {
> -	.base = 0,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v8 = {
>  	.version	= MFC_VERSION_V8,
>  	.version_bit	= MFC_V8_BIT,
>  	.port_num	= MFC_NUM_PORTS_V8,
>  	.buf_size	= &buf_size_v8,
> -	.buf_align	= &mfc_buf_align_v8,
>  	.fw_name[0]     = "s5p-mfc-v8.fw",
>  	.clk_names	= {"mfc"},
>  	.num_clocks	= 1,
> @@ -1535,7 +1515,6 @@ static int s5p_mfc_resume(struct device *dev)
>  	.version_bit	= MFC_V8_BIT,
>  	.port_num	= MFC_NUM_PORTS_V8,
>  	.buf_size	= &buf_size_v8,
> -	.buf_align	= &mfc_buf_align_v8,
>  	.fw_name[0]     = "s5p-mfc-v8.fw",
>  	.clk_names	= {"pclk", "aclk", "aclk_xiu"},
>  	.num_clocks	= 3,
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index ab23236aa942..3e0e8eaf8bfe 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -44,14 +44,6 @@
>  
>  #include <media/videobuf2-dma-contig.h>
>  
> -static inline dma_addr_t s5p_mfc_mem_cookie(void *a, void *b)
> -{
> -	/* Same functionality as the vb2_dma_contig_plane_paddr */
> -	dma_addr_t *paddr = vb2_dma_contig_memops.cookie(b);
> -
> -	return *paddr;
> -}
> -
>  /* MFC definitions */
>  #define MFC_MAX_EXTRA_DPB       5
>  #define MFC_MAX_BUFFERS		32
> @@ -229,16 +221,11 @@ struct s5p_mfc_buf_size {
>  	void *priv;
>  };
>  
> -struct s5p_mfc_buf_align {
> -	unsigned int base;
> -};
> -
>  struct s5p_mfc_variant {
>  	unsigned int version;
>  	unsigned int port_num;
>  	u32 version_bit;
>  	struct s5p_mfc_buf_size *buf_size;
> -	struct s5p_mfc_buf_align *buf_align;
>  	char	*fw_name[MFC_FW_MAX_VERSIONS];
>  	const char	*clk_names[MFC_MAX_CLOCKS];
>  	int		num_clocks;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
> index 8e5df041edf7..45c807bf19cc 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
> @@ -18,7 +18,6 @@
>  int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev);
>  int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev);
>  int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev);
> -int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev);
>  
>  int s5p_mfc_init_hw(struct s5p_mfc_dev *dev);
>  void s5p_mfc_deinit_hw(struct s5p_mfc_dev *dev);


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Smitha T Murthy March 3, 2017, 9:24 a.m. UTC | #2
On Mon, 2017-02-20 at 14:38 +0100, Marek Szyprowski wrote:
> Remove unused structures, definitions and functions that are no longer
> called from the driver code.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Acked-by: Andrzej Hajda <a.hajda@samsung.com>

Hi Marek,
I tested this complete series on Exynos7880, along with my MFC v10.10
patchset v2 [1] and it's working fine.

Please review MFC v10.10 series. 

Tested-by: Smitha T Murthy <smitha.t@samsung.com>

[1]: https://www.spinics.net/lists/arm-kernel/msg566019.html

Thanks,
Smitha T Murthy



--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Smitha T Murthy March 3, 2017, 11:56 a.m. UTC | #3
On Mon, 2017-02-20 at 14:38 +0100, Marek Szyprowski wrote:
> Remove unused structures, definitions and functions that are no longer
> called from the driver code.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Acked-by: Andrzej Hajda <a.hajda@samsung.com>

Reviewed-by: Smitha T Murthy <smitha.t@samsung.com>

Regards,
Smitha T Murthy
> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c        | 21 ---------------------
>  drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 13 -------------
>  drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h   |  1 -
>  3 files changed, 35 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index 05fe82be6584..3e1f22eb4339 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -1422,16 +1422,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v5,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v5 = {
> -	.base = MFC_BASE_ALIGN_ORDER,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v5 = {
>  	.version	= MFC_VERSION,
>  	.version_bit	= MFC_V5_BIT,
>  	.port_num	= MFC_NUM_PORTS,
>  	.buf_size	= &buf_size_v5,
> -	.buf_align	= &mfc_buf_align_v5,
>  	.fw_name[0]	= "s5p-mfc.fw",
>  	.clk_names	= {"mfc", "sclk_mfc"},
>  	.num_clocks	= 2,
> @@ -1452,16 +1447,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v6,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v6 = {
> -	.base = 0,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v6 = {
>  	.version	= MFC_VERSION_V6,
>  	.version_bit	= MFC_V6_BIT,
>  	.port_num	= MFC_NUM_PORTS_V6,
>  	.buf_size	= &buf_size_v6,
> -	.buf_align	= &mfc_buf_align_v6,
>  	.fw_name[0]     = "s5p-mfc-v6.fw",
>  	/*
>  	 * v6-v2 firmware contains bug fixes and interface change
> @@ -1486,16 +1476,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v7,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v7 = {
> -	.base = 0,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v7 = {
>  	.version	= MFC_VERSION_V7,
>  	.version_bit	= MFC_V7_BIT,
>  	.port_num	= MFC_NUM_PORTS_V7,
>  	.buf_size	= &buf_size_v7,
> -	.buf_align	= &mfc_buf_align_v7,
>  	.fw_name[0]     = "s5p-mfc-v7.fw",
>  	.clk_names	= {"mfc", "sclk_mfc"},
>  	.num_clocks	= 2,
> @@ -1515,16 +1500,11 @@ static int s5p_mfc_resume(struct device *dev)
>  	.priv	= &mfc_buf_size_v8,
>  };
>  
> -static struct s5p_mfc_buf_align mfc_buf_align_v8 = {
> -	.base = 0,
> -};
> -
>  static struct s5p_mfc_variant mfc_drvdata_v8 = {
>  	.version	= MFC_VERSION_V8,
>  	.version_bit	= MFC_V8_BIT,
>  	.port_num	= MFC_NUM_PORTS_V8,
>  	.buf_size	= &buf_size_v8,
> -	.buf_align	= &mfc_buf_align_v8,
>  	.fw_name[0]     = "s5p-mfc-v8.fw",
>  	.clk_names	= {"mfc"},
>  	.num_clocks	= 1,
> @@ -1535,7 +1515,6 @@ static int s5p_mfc_resume(struct device *dev)
>  	.version_bit	= MFC_V8_BIT,
>  	.port_num	= MFC_NUM_PORTS_V8,
>  	.buf_size	= &buf_size_v8,
> -	.buf_align	= &mfc_buf_align_v8,
>  	.fw_name[0]     = "s5p-mfc-v8.fw",
>  	.clk_names	= {"pclk", "aclk", "aclk_xiu"},
>  	.num_clocks	= 3,
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index ab23236aa942..3e0e8eaf8bfe 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -44,14 +44,6 @@
>  
>  #include <media/videobuf2-dma-contig.h>
>  
> -static inline dma_addr_t s5p_mfc_mem_cookie(void *a, void *b)
> -{
> -	/* Same functionality as the vb2_dma_contig_plane_paddr */
> -	dma_addr_t *paddr = vb2_dma_contig_memops.cookie(b);
> -
> -	return *paddr;
> -}
> -
>  /* MFC definitions */
>  #define MFC_MAX_EXTRA_DPB       5
>  #define MFC_MAX_BUFFERS		32
> @@ -229,16 +221,11 @@ struct s5p_mfc_buf_size {
>  	void *priv;
>  };
>  
> -struct s5p_mfc_buf_align {
> -	unsigned int base;
> -};
> -
>  struct s5p_mfc_variant {
>  	unsigned int version;
>  	unsigned int port_num;
>  	u32 version_bit;
>  	struct s5p_mfc_buf_size *buf_size;
> -	struct s5p_mfc_buf_align *buf_align;
>  	char	*fw_name[MFC_FW_MAX_VERSIONS];
>  	const char	*clk_names[MFC_MAX_CLOCKS];
>  	int		num_clocks;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
> index 8e5df041edf7..45c807bf19cc 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
> @@ -18,7 +18,6 @@
>  int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev);
>  int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev);
>  int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev);
> -int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev);
>  
>  int s5p_mfc_init_hw(struct s5p_mfc_dev *dev);
>  void s5p_mfc_deinit_hw(struct s5p_mfc_dev *dev);


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 05fe82be6584..3e1f22eb4339 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1422,16 +1422,11 @@  static int s5p_mfc_resume(struct device *dev)
 	.priv	= &mfc_buf_size_v5,
 };
 
-static struct s5p_mfc_buf_align mfc_buf_align_v5 = {
-	.base = MFC_BASE_ALIGN_ORDER,
-};
-
 static struct s5p_mfc_variant mfc_drvdata_v5 = {
 	.version	= MFC_VERSION,
 	.version_bit	= MFC_V5_BIT,
 	.port_num	= MFC_NUM_PORTS,
 	.buf_size	= &buf_size_v5,
-	.buf_align	= &mfc_buf_align_v5,
 	.fw_name[0]	= "s5p-mfc.fw",
 	.clk_names	= {"mfc", "sclk_mfc"},
 	.num_clocks	= 2,
@@ -1452,16 +1447,11 @@  static int s5p_mfc_resume(struct device *dev)
 	.priv	= &mfc_buf_size_v6,
 };
 
-static struct s5p_mfc_buf_align mfc_buf_align_v6 = {
-	.base = 0,
-};
-
 static struct s5p_mfc_variant mfc_drvdata_v6 = {
 	.version	= MFC_VERSION_V6,
 	.version_bit	= MFC_V6_BIT,
 	.port_num	= MFC_NUM_PORTS_V6,
 	.buf_size	= &buf_size_v6,
-	.buf_align	= &mfc_buf_align_v6,
 	.fw_name[0]     = "s5p-mfc-v6.fw",
 	/*
 	 * v6-v2 firmware contains bug fixes and interface change
@@ -1486,16 +1476,11 @@  static int s5p_mfc_resume(struct device *dev)
 	.priv	= &mfc_buf_size_v7,
 };
 
-static struct s5p_mfc_buf_align mfc_buf_align_v7 = {
-	.base = 0,
-};
-
 static struct s5p_mfc_variant mfc_drvdata_v7 = {
 	.version	= MFC_VERSION_V7,
 	.version_bit	= MFC_V7_BIT,
 	.port_num	= MFC_NUM_PORTS_V7,
 	.buf_size	= &buf_size_v7,
-	.buf_align	= &mfc_buf_align_v7,
 	.fw_name[0]     = "s5p-mfc-v7.fw",
 	.clk_names	= {"mfc", "sclk_mfc"},
 	.num_clocks	= 2,
@@ -1515,16 +1500,11 @@  static int s5p_mfc_resume(struct device *dev)
 	.priv	= &mfc_buf_size_v8,
 };
 
-static struct s5p_mfc_buf_align mfc_buf_align_v8 = {
-	.base = 0,
-};
-
 static struct s5p_mfc_variant mfc_drvdata_v8 = {
 	.version	= MFC_VERSION_V8,
 	.version_bit	= MFC_V8_BIT,
 	.port_num	= MFC_NUM_PORTS_V8,
 	.buf_size	= &buf_size_v8,
-	.buf_align	= &mfc_buf_align_v8,
 	.fw_name[0]     = "s5p-mfc-v8.fw",
 	.clk_names	= {"mfc"},
 	.num_clocks	= 1,
@@ -1535,7 +1515,6 @@  static int s5p_mfc_resume(struct device *dev)
 	.version_bit	= MFC_V8_BIT,
 	.port_num	= MFC_NUM_PORTS_V8,
 	.buf_size	= &buf_size_v8,
-	.buf_align	= &mfc_buf_align_v8,
 	.fw_name[0]     = "s5p-mfc-v8.fw",
 	.clk_names	= {"pclk", "aclk", "aclk_xiu"},
 	.num_clocks	= 3,
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
index ab23236aa942..3e0e8eaf8bfe 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
@@ -44,14 +44,6 @@ 
 
 #include <media/videobuf2-dma-contig.h>
 
-static inline dma_addr_t s5p_mfc_mem_cookie(void *a, void *b)
-{
-	/* Same functionality as the vb2_dma_contig_plane_paddr */
-	dma_addr_t *paddr = vb2_dma_contig_memops.cookie(b);
-
-	return *paddr;
-}
-
 /* MFC definitions */
 #define MFC_MAX_EXTRA_DPB       5
 #define MFC_MAX_BUFFERS		32
@@ -229,16 +221,11 @@  struct s5p_mfc_buf_size {
 	void *priv;
 };
 
-struct s5p_mfc_buf_align {
-	unsigned int base;
-};
-
 struct s5p_mfc_variant {
 	unsigned int version;
 	unsigned int port_num;
 	u32 version_bit;
 	struct s5p_mfc_buf_size *buf_size;
-	struct s5p_mfc_buf_align *buf_align;
 	char	*fw_name[MFC_FW_MAX_VERSIONS];
 	const char	*clk_names[MFC_MAX_CLOCKS];
 	int		num_clocks;
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
index 8e5df041edf7..45c807bf19cc 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h
@@ -18,7 +18,6 @@ 
 int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev);
 int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev);
 int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev);
-int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev);
 
 int s5p_mfc_init_hw(struct s5p_mfc_dev *dev);
 void s5p_mfc_deinit_hw(struct s5p_mfc_dev *dev);