[U-Boot] [PATCH 0/2] video: Fix compilation warnings for exynos video

This patchset fixes the following compilation warnings: exynos_dp.c: In function 'exynos_init_dp': exynos_dp.c:860:23: warning: variable 'disp_info' set but not used [-Wunused-but-set-variable] exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
[PATCH 1/2] video: exynos_dp: Remove unused variable disp_info [PATCH 2/2] video: exynos_fb: Make a call to draw_logo only when CONFIG_CMD_BMP is selected
drivers/video/exynos_dp.c | 2 -- drivers/video/exynos_fb.c | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-)

Remove unused variable disp_info to fix the following compilation warning: exynos_dp.c: In function 'exynos_init_dp': exynos_dp.c:860:23: warning: variable 'disp_info' set but not used [-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com --- drivers/video/exynos_dp.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/video/exynos_dp.c b/drivers/video/exynos_dp.c index 53e4101..d72fa56 100644 --- a/drivers/video/exynos_dp.c +++ b/drivers/video/exynos_dp.c @@ -857,7 +857,6 @@ unsigned int exynos_init_dp(void) { unsigned int ret; struct edp_device_info *edp_info; - struct edp_disp_info disp_info;
edp_info = kzalloc(sizeof(struct edp_device_info), GFP_KERNEL); if (!edp_info) { @@ -870,7 +869,6 @@ unsigned int exynos_init_dp(void) debug("failed to get edp_info data.\n"); return -EFAULT; } - disp_info = edp_info->disp_info;
exynos_dp_disp_info(&edp_info->disp_info);

On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar ajaykumar.rs@samsung.com wrote:
Remove unused variable disp_info to fix the following compilation warning: exynos_dp.c: In function 'exynos_init_dp': exynos_dp.c:860:23: warning: variable 'disp_info' set but not used [-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
Acked-by: Simon Glass sjg@chromium.org
drivers/video/exynos_dp.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/video/exynos_dp.c b/drivers/video/exynos_dp.c index 53e4101..d72fa56 100644 --- a/drivers/video/exynos_dp.c +++ b/drivers/video/exynos_dp.c @@ -857,7 +857,6 @@ unsigned int exynos_init_dp(void) { unsigned int ret; struct edp_device_info *edp_info;
struct edp_disp_info disp_info; edp_info = kzalloc(sizeof(struct edp_device_info), GFP_KERNEL); if (!edp_info) {
@@ -870,7 +869,6 @@ unsigned int exynos_init_dp(void) debug("failed to get edp_info data.\n"); return -EFAULT; }
disp_info = edp_info->disp_info; exynos_dp_disp_info(&edp_info->disp_info);
-- 1.8.0

Previously, the call to draw_logo() was happening irrespective of whether we have selected logo or LCD console. With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected.
This would even fix the following compilation warning: exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com --- drivers/video/exynos_fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 183bca0..ee0ed06 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); }
+#ifdef CONFIG_CMD_BMP static void draw_logo(void) { int x, y; @@ -88,10 +89,9 @@ static void draw_logo(void) }
addr = panel_info.logo_addr; -#ifdef CONFIG_CMD_BMP bmp_display(addr, x, y); -#endif } +#endif
static void lcd_panel_on(vidinfo_t *vid) { @@ -150,7 +150,9 @@ void lcd_enable(void) if (panel_info.logo_on) { memset(lcd_base, 0, panel_width * panel_height * (NBITS(panel_info.vl_bpix) >> 3)); +#ifdef CONFIG_CMD_BMP draw_logo(); +#endif }
lcd_panel_on(&panel_info);

Hi Ajay,
On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar ajaykumar.rs@samsung.com wrote:
Previously, the call to draw_logo() was happening irrespective of whether we have selected logo or LCD console. With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected.
This would even fix the following compilation warning: exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
drivers/video/exynos_fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 183bca0..ee0ed06 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); }
+#ifdef CONFIG_CMD_BMP static void draw_logo(void) { int x, y; @@ -88,10 +89,9 @@ static void draw_logo(void) }
addr = panel_info.logo_addr;
-#ifdef CONFIG_CMD_BMP bmp_display(addr, x, y); -#endif } +#endif
static void lcd_panel_on(vidinfo_t *vid) { @@ -150,7 +150,9 @@ void lcd_enable(void) if (panel_info.logo_on) { memset(lcd_base, 0, panel_width * panel_height * (NBITS(panel_info.vl_bpix) >> 3)); +#ifdef CONFIG_CMD_BMP draw_logo(); +#endif
It would be nice to avoid another #ifdef. Would it be possible instead to make the first #ifdef cover the whole internals of the draw_logo() function?
} lcd_panel_on(&panel_info);
-- 1.8.0
Regards, Simon

Hi Simon,
On Tue, Jan 22, 2013 at 7:13 PM, Simon Glass sjg@chromium.org wrote:
Hi Ajay,
On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar ajaykumar.rs@samsung.com wrote:
Previously, the call to draw_logo() was happening irrespective of whether we have selected logo or LCD console. With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected.
This would even fix the following compilation warning: exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
drivers/video/exynos_fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 183bca0..ee0ed06 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); }
+#ifdef CONFIG_CMD_BMP static void draw_logo(void) { int x, y; @@ -88,10 +89,9 @@ static void draw_logo(void) }
addr = panel_info.logo_addr;
-#ifdef CONFIG_CMD_BMP bmp_display(addr, x, y); -#endif } +#endif
static void lcd_panel_on(vidinfo_t *vid) { @@ -150,7 +150,9 @@ void lcd_enable(void) if (panel_info.logo_on) { memset(lcd_base, 0, panel_width * panel_height * (NBITS(panel_info.vl_bpix) >> 3)); +#ifdef CONFIG_CMD_BMP draw_logo(); +#endif
It would be nice to avoid another #ifdef. Would it be possible instead to make the first #ifdef cover the whole internals of the draw_logo() function?
This patchset has already been merged!
} lcd_panel_on(&panel_info);
-- 1.8.0
Regards, Simon
Regards, Ajay

Hi Ajay,
On Tue, Jan 22, 2013 at 6:11 AM, Ajay kumar ajaynumb@gmail.com wrote:
Hi Simon,
On Tue, Jan 22, 2013 at 7:13 PM, Simon Glass sjg@chromium.org wrote:
Hi Ajay,
On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar ajaykumar.rs@samsung.com wrote:
Previously, the call to draw_logo() was happening irrespective of whether we have selected logo or LCD console. With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected.
This would even fix the following compilation warning: exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
drivers/video/exynos_fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 183bca0..ee0ed06 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); }
+#ifdef CONFIG_CMD_BMP static void draw_logo(void) { int x, y; @@ -88,10 +89,9 @@ static void draw_logo(void) }
addr = panel_info.logo_addr;
-#ifdef CONFIG_CMD_BMP bmp_display(addr, x, y); -#endif } +#endif
static void lcd_panel_on(vidinfo_t *vid) { @@ -150,7 +150,9 @@ void lcd_enable(void) if (panel_info.logo_on) { memset(lcd_base, 0, panel_width * panel_height * (NBITS(panel_info.vl_bpix) >> 3)); +#ifdef CONFIG_CMD_BMP draw_logo(); +#endif
It would be nice to avoid another #ifdef. Would it be possible instead to make the first #ifdef cover the whole internals of the draw_logo() function?
This patchset has already been merged!
No problem - I have been away for a week and didn't see the 'applied' response.
} lcd_panel_on(&panel_info);
-- 1.8.0
Regards, Simon
Regards, Ajay
Regards, Simon

On 14/01/13 18:32, Ajay Kumar wrote:
This patchset fixes the following compilation warnings: exynos_dp.c: In function 'exynos_init_dp': exynos_dp.c:860:23: warning: variable 'disp_info' set but not used [-Wunused-but-set-variable] exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
[PATCH 1/2] video: exynos_dp: Remove unused variable disp_info [PATCH 2/2] video: exynos_fb: Make a call to draw_logo only when CONFIG_CMD_BMP is selected
drivers/video/exynos_dp.c | 2 -- drivers/video/exynos_fb.c | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-)
applied to u-boot-samsung.
Thanks, Minkyu Kang.
participants (4)
-
Ajay Kumar
-
Ajay kumar
-
Minkyu Kang
-
Simon Glass