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
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")
Reported-by: Hulk Robot hulkci@huawei.com Signed-off-by: zhengbin zhengbin13@huawei.com --- drivers/gpu/drm/omapdrm/omap_fb.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index 1b8b510..001f425 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -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
Hi Zhengbin,
Thank you for the patch.
On Tue, Oct 08, 2019 at 03:15:46PM +0800, zhengbin wrote:
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
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(-)
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
Hi Zhengbin,
Thank you for the patch.
On Tue, Oct 08, 2019 at 03:15:47PM +0800, zhengbin wrote:
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
Fixes 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")
Reported-by: Hulk Robot hulkci@huawei.com Signed-off-by: zhengbin zhengbin13@huawei.com --- drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c index 7400fb9..0b79ff0 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c @@ -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
Hi Zhengbin,
Thank you for the patch.
On Tue, Oct 08, 2019 at 03:15:48PM +0800, zhengbin wrote:
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.
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
core_cfg.n = n; core_cfg.cts = cts;
Fixes 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")
Reported-by: Hulk Robot hulkci@huawei.com Signed-off-by: zhengbin zhengbin13@huawei.com --- drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c index 5d5d558..6f3988e 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c @@ -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
Hi Zhengbin,
Thank you for the patch.
On Tue, Oct 08, 2019 at 03:15:49PM +0800, zhengbin wrote:
Same analysis as for patch 3/4,
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
dri-devel@lists.freedesktop.org