diff mbox series

[2/4] drm/omap: Remove set but not used variable 'tclk_trail'

Message ID 1570518949-47574-3-git-send-email-zhengbin13@huawei.com (mailing list archive)
State New, archived
Headers show
Series drm/omap: Remove some set but not used variables | expand

Commit Message

Zheng Bin Oct. 8, 2019, 7:15 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/omapdrm/dss/dsi.c: In function dsi_proto_timings:
drivers/gpu/drm/omapdrm/dss/dsi.c:3562:46: warning: variable tclk_trail set but not used [-Wunused-but-set-variable]

It is not used since commit 9960aa7cb58c ("drm/omap:
move omapdss & displays under omapdrm")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
2.7.4

Comments

Laurent Pinchart Oct. 9, 2019, 9:35 p.m. UTC | #1
Hi Zhengbin,

Thank you for the patch.

On Tue, Oct 08, 2019 at 03:15:47PM +0800, zhengbin wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/omapdrm/dss/dsi.c: In function dsi_proto_timings:
> drivers/gpu/drm/omapdrm/dss/dsi.c:3562:46: warning: variable tclk_trail set but not used [-Wunused-but-set-variable]
> 
> It is not used since commit 9960aa7cb58c ("drm/omap:
> move omapdss & displays under omapdrm")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index b30fcaa..da16ea0 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -3548,7 +3548,7 @@ static int dsi_proto_config(struct dsi_data *dsi)
> 
>  static void dsi_proto_timings(struct dsi_data *dsi)
>  {
> -	unsigned int tlpx, tclk_zero, tclk_prepare, tclk_trail;
> +	unsigned int tlpx, tclk_zero, tclk_prepare;
>  	unsigned int tclk_pre, tclk_post;
>  	unsigned int ths_prepare, ths_prepare_ths_zero, ths_zero;
>  	unsigned int ths_trail, ths_exit;
> @@ -3567,7 +3567,6 @@ static void dsi_proto_timings(struct dsi_data *dsi)
> 
>  	r = dsi_read_reg(dsi, DSI_DSIPHY_CFG1);
>  	tlpx = FLD_GET(r, 20, 16) * 2;
> -	tclk_trail = FLD_GET(r, 15, 8);
>  	tclk_zero = FLD_GET(r, 7, 0);
> 
>  	r = dsi_read_reg(dsi, DSI_DSIPHY_CFG2);
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index b30fcaa..da16ea0 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -3548,7 +3548,7 @@  static int dsi_proto_config(struct dsi_data *dsi)

 static void dsi_proto_timings(struct dsi_data *dsi)
 {
-	unsigned int tlpx, tclk_zero, tclk_prepare, tclk_trail;
+	unsigned int tlpx, tclk_zero, tclk_prepare;
 	unsigned int tclk_pre, tclk_post;
 	unsigned int ths_prepare, ths_prepare_ths_zero, ths_zero;
 	unsigned int ths_trail, ths_exit;
@@ -3567,7 +3567,6 @@  static void dsi_proto_timings(struct dsi_data *dsi)

 	r = dsi_read_reg(dsi, DSI_DSIPHY_CFG1);
 	tlpx = FLD_GET(r, 20, 16) * 2;
-	tclk_trail = FLD_GET(r, 15, 8);
 	tclk_zero = FLD_GET(r, 7, 0);

 	r = dsi_read_reg(dsi, DSI_DSIPHY_CFG2);