diff mbox series

[U-Boot,v2,1/2] video: bmp: Fix video_splash_align_axis()

Message ID 20191120131116.20620-2-patrice.chotard@st.com
State Accepted
Delegated to: Anatolij Gustschin
Headers show
Series Fix BMP decode when BMP size is bigger than framebuffer | expand

Commit Message

Patrice CHOTARD Nov. 20, 2019, 1:11 p.m. UTC
Convert panel_picture_delta from unsigned long to long to insure
to store correctly the difference between panel_size and picture_size
in case the panel_size is smaller than picture_size.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
CC: Yannick Fertré <yannick.fertre@st.com>

---

Changes in v2:
     - Convert panel_picture_delta from unsigned long to long

 drivers/video/video_bmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anatolij Gustschin Dec. 10, 2019, 10:21 a.m. UTC | #1
On Wed, 20 Nov 2019 14:11:15 +0100
Patrice Chotard patrice.chotard@st.com wrote:
...
> Changes in v2:
>      - Convert panel_picture_delta from unsigned long to long
> 
>  drivers/video/video_bmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Also changed 'axis_alignment' to long and applied to u-boot-video/master,
thanks!

--
Anatolij
diff mbox series

Patch

diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 193f37d275..92847a8088 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -157,7 +157,7 @@  __weak void fb_put_word(uchar **fb, uchar **from)
 static void video_splash_align_axis(int *axis, unsigned long panel_size,
 				    unsigned long picture_size)
 {
-	unsigned long panel_picture_delta = panel_size - picture_size;
+	long panel_picture_delta = panel_size - picture_size;
 	unsigned long axis_alignment;
 
 	if (*axis == BMP_ALIGN_CENTER)