drm/omap: Remove some set but not used variables
Subsystems (3)
cover drm/omap: Remove some set but not used variables
zhengbin (4):
drm/omap: Remove set but not used variable 'plane' drm/omap: Remove set but not used variable 'tclk_trail' drm/omap: Remove set but not used variable 'err' in hdmi5_audio_config drm/omap: Remove set but not used variable 'err' in hdmi4_audio_config
drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_fb.c | 3 --- 4 files changed, 5 insertions(+), 9 deletions(-)
--
2.7.4
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/4 drm/omap: Remove set but not used variable 'plane'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/omap_fb.c: In function omap_framebuffer_update_scanout:drivers/gpu/drm/omapdrm/omap_fb.c:130:16: warning: variable plane set but not used [-Wunused-but-set-variable]
It is not used since commit 2ecceeb53b19 ("drm/omap:
Move buffer pitch/offset to drm_framebuffer")
--- drivers/gpu/drm/omapdrm/omap_fb.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/omapdrm/omap_fb.c +0 -3
@@ -135,7 +135,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, {struct omap_framebuffer *omap_fb =to_omap_framebuffer (fb);const struct drm_format_info *format = omap_fb->format; -struct plane *plane = &omap_fb->planes[0 ];u32 x, y, orient =0 ; info->fourcc = fb->format->format;
@@ -209,8 +208,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, info->screen_width /= format->cpp[0 ];if (fb->format->format ==DRM_FORMAT_NV12 ) { - plane = &omap_fb->planes[1 ]; -if (info->rotation_type ==OMAP_DSS_ROT_TILER ) {WARN_ON (!(omap_gem_flags (fb->obj[1 ]) &OMAP_BO_TILED )); omap_gem_rotated_dma_addr(fb->obj[1], orient, x/2, y/2,
--
2.7.4
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/4] drm/omap: Remove set but not used variable 'plane'
Hi Zhengbin,
Thank you for the patch.
Quoted 10 lines · zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/omap_fb.c: In functionomap_framebuffer_update_scanout:drivers/gpu/drm/omapdrm/omap_fb.c:130:16: warning: variable plane set but not used [-Wunused-but-set-variable]It is not used since commit
2ecceeb53b19("drm/omap:
Move buffer pitch/offset todrm_framebuffer")Reported-by Hulk Robot <[email protected]>Signed-off-by zhengbin <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/omapdrm/omap_fb.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/omapdrm/omap_fb.c +0
-3@@ -135,7 +135,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, {struct omap_framebuffer *omap_fb =to_omap_framebuffer (fb);const struct drm_format_info *format = omap_fb->format; -struct plane *plane = &omap_fb->planes[0 ];u32 x, y, orient =0 ; info->fourcc = fb->format->format;@@ -209,8 +208,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, info->screen_width /= format->cpp[0 ];if (fb->format->format ==DRM_FORMAT_NV12 ) { - plane = &omap_fb->planes[1 ]; -if (info->rotation_type ==OMAP_DSS_ROT_TILER ) {WARN_ON (!(omap_gem_flags (fb->obj[1 ]) &OMAP_BO_TILED )); omap_gem_rotated_dma_addr(fb->obj[1], orient, x/2, y/2,
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm/omap: Remove set but not used variable 'tclk_trail'
In reply to zhengbinFixes 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")
--- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/dss/dsi.c +1 -2
@@ -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
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/4] drm/omap: Remove set but not used variable 'tclk_trail'
Hi Zhengbin,
Thank you for the patch.
Quoted 10 lines · zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/dss/dsi.c: In functiondsi_proto_timings:drivers/gpu/drm/omapdrm/dss/dsi.c:3562:46: warning: variabletclk_trailset 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 <[email protected]>Signed-off-by zhengbin <[email protected]>
Quoted 28 lines
--- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/omapdrm/dss/dsi.c +1
-3@@ -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
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm/omap: Remove set but not used variable 'err' in hdmi5_audio_config
In reply to zhengbinFixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c: In function hdmi5_audio_config:drivers/gpu/drm/omapdrm/dss/hdmi5_core.c:812:6: warning: variable err set but not used [-Wunused-but-set-variable]
It is not used since commit f5bab2229190 ("OMAPDSS:
HDMI: Add OMAP5 HDMI support")
--- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +2 -2
@@ -798,7 +798,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,struct hdmi_audio_format audio_format;struct hdmi_audio_dma audio_dma;struct hdmi_core_audio_config core_cfg; -int err, n, cts, channel_count; +int n, cts, channel_count;unsigned int fs_nr;bool word_length_16b = false;
@@ -841,7 +841,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,return -EINVAL ; } - err =hdmi_compute_acr (pclk, fs_nr, &n, &cts); +hdmi_compute_acr (pclk, fs_nr, &n, &cts); core_cfg.n = n; core_cfg.cts = cts;
--
2.7.4
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/4] drm/omap: Remove set but not used variable 'err' in hdmi5_audio_config
Hi Zhengbin,
Thank you for the patch.
Quoted 28 lines · zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c: In functionhdmi5_audio_config:drivers/gpu/drm/omapdrm/dss/hdmi5_core.c:812:6: warning: variable err set but not used [-Wunused-but-set-variable]It is not used since commit
f5bab2229190("OMAPDSS:
HDMI: Add OMAP5 HDMI support")Reported-by Hulk Robot <[email protected]>Signed-off-by zhengbin <[email protected]>--- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +1
-1@@ -798,7 +798,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,struct hdmi_audio_format audio_format;struct hdmi_audio_dma audio_dma;struct hdmi_core_audio_config core_cfg; -int err, n, cts, channel_count; +int n, cts, channel_count;unsigned int fs_nr;bool word_length_16b = false;
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, · line 844
Quoted 5 lines
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +1
-1@@ -841,7 +841,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,return -EINVAL ; } - err =hdmi_compute_acr (pclk, fs_nr, &n, &cts); +hdmi_compute_acr (pclk, fs_nr, &n, &cts);
Ideally we should propagate the error back, but we would end up in hdmi5_bridge_enable() that is a void function, so there's little point in doing so. Furthemore the errors reported by hdmi_compute_acr() really can't happen, so this is safe.
Quoted 3 lines
drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +0
-0core_cfg.n = n; core_cfg.cts = cts;
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 drm/omap: Remove set but not used variable 'err' in hdmi4_audio_config
In reply to zhengbinFixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c: In function hdmi4_audio_config:drivers/gpu/drm/omapdrm/dss/hdmi4_core.c:689:6: warning: variable err set but not used [-Wunused-but-set-variable]
It is not used since commit f5bab2229190 ("OMAPDSS:
HDMI: Add OMAP5 HDMI support")
--- drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c +2 -2
@@ -675,7 +675,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,struct hdmi_audio_format audio_format;struct hdmi_audio_dma audio_dma;struct hdmi_core_audio_config acore; -int err, n, cts, channel_count; +int n, cts, channel_count;unsigned int fs_nr;bool word_length_16b = false;
@@ -737,7 +737,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,return -EINVAL ; } - err =hdmi_compute_acr (pclk, fs_nr, &n, &cts); +hdmi_compute_acr (pclk, fs_nr, &n, &cts);/* Audio clock regeneration settings */ acore.n = n;
--
2.7.4
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/4] drm/omap: Remove set but not used variable 'err' in hdmi4_audio_config
Hi Zhengbin,
Thank you for the patch.
Quoted 10 lines · zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c: In functionhdmi4_audio_config:drivers/gpu/drm/omapdrm/dss/hdmi4_core.c:689:6: warning: variable err set but not used [-Wunused-but-set-variable]It is not used since commit
f5bab2229190("OMAPDSS:
HDMI: Add OMAP5 HDMI support")Reported-by Hulk Robot <[email protected]>Signed-off-by zhengbin <[email protected]>
Same analysis as for patch 3/4,
Quoted 26 lines
--- drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/omapdrm/dss/hdmi4_core.c +2
-2@@ -675,7 +675,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,struct hdmi_audio_format audio_format;struct hdmi_audio_dma audio_dma;struct hdmi_core_audio_config acore; -int err, n, cts, channel_count; +int n, cts, channel_count;unsigned int fs_nr;bool word_length_16b = false;@@ -737,7 +737,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp,return -EINVAL ; } - err =hdmi_compute_acr (pclk, fs_nr, &n, &cts); +hdmi_compute_acr (pclk, fs_nr, &n, &cts);/* Audio clock regeneration settings */ acore.n = n;
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
Quoted 11 lines · zhengbin
zhengbin (4):
drm/omap: Remove set but not used variable 'plane' drm/omap: Remove set but not used variable 'tclk_trail' drm/omap: Remove set but not used variable 'err' inhdmi5_audio_configdrm/omap: Remove set but not used variable 'err' inhdmi4_audio_configdrivers/gpu/drm/omapdrm/dss/dsi.c | 3 +-- drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_fb.c | 3 --- 4 files changed, 5 insertions(+), 9 deletions(-)
Thanks! I'll pick these up.
Tomi
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel