From 86baf7aee68c387ca7dc8770c857a215aceaf92c Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sat, 15 Mar 2025 19:08:02 +0530 Subject: [PATCH] drivers/intel/fsp2_0: Use consistent spacing in BMP color translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch corrects spacing around assignment operators in the `fill_blt_buffer` to comply with coding style guidelines, specifically within the BMP color translation logic for 1/4/8/24/32-bit images. Change-Id: Ia243d11568ec4c3d1108ff60289743919394aa32 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/86860 Reviewed-by: Jérémy Compostella Reviewed-by: Karthik Ramasubramanian Tested-by: build bot (Jenkins) --- src/drivers/intel/fsp2_0/fsp_gop_blt.c | 29 ++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/drivers/intel/fsp2_0/fsp_gop_blt.c b/src/drivers/intel/fsp2_0/fsp_gop_blt.c index 8292b3b68d..bbeece4e97 100644 --- a/src/drivers/intel/fsp2_0/fsp_gop_blt.c +++ b/src/drivers/intel/fsp2_0/fsp_gop_blt.c @@ -166,9 +166,12 @@ static void *fill_blt_buffer(efi_bmp_image_header *header, /* Translate 1-bit (2 colors) BMP to 24-bit color */ case 1: for (index = 0; index < 8 && width < header->PixelWidth; index++) { - gop_blt->Red = bmp_color_map[((*bmp_image) >> (7 - index)) & 0x1].Red; - gop_blt->Green = bmp_color_map[((*bmp_image) >> (7 - index)) & 0x1].Green; - gop_blt->Blue = bmp_color_map[((*bmp_image) >> (7 - index)) & 0x1].Blue; + gop_blt->Red = bmp_color_map[((*bmp_image) >> (7 - index)) + & 0x1].Red; + gop_blt->Green = bmp_color_map[((*bmp_image) >> (7 - index)) + & 0x1].Green; + gop_blt->Blue = bmp_color_map[((*bmp_image) >> (7 - index)) + & 0x1].Blue; gop_blt++; width++; } @@ -179,38 +182,38 @@ static void *fill_blt_buffer(efi_bmp_image_header *header, /* Translate 4-bit (16 colors) BMP Palette to 24-bit color */ case 4: index = (*bmp_image) >> 4; - gop_blt->Red = bmp_color_map[index].Red; + gop_blt->Red = bmp_color_map[index].Red; gop_blt->Green = bmp_color_map[index].Green; - gop_blt->Blue = bmp_color_map[index].Blue; + gop_blt->Blue = bmp_color_map[index].Blue; if (width < (header->PixelWidth - 1)) { gop_blt++; width++; index = (*bmp_image) & 0x0f; - gop_blt->Red = bmp_color_map[index].Red; + gop_blt->Red = bmp_color_map[index].Red; gop_blt->Green = bmp_color_map[index].Green; - gop_blt->Blue = bmp_color_map[index].Blue; + gop_blt->Blue = bmp_color_map[index].Blue; } break; /* Translate 8-bit (256 colors) BMP Palette to 24-bit color */ case 8: - gop_blt->Red = bmp_color_map[*bmp_image].Red; + gop_blt->Red = bmp_color_map[*bmp_image].Red; gop_blt->Green = bmp_color_map[*bmp_image].Green; - gop_blt->Blue = bmp_color_map[*bmp_image].Blue; + gop_blt->Blue = bmp_color_map[*bmp_image].Blue; break; /* For 24-bit BMP */ case 24: - gop_blt->Blue = *bmp_image++; + gop_blt->Blue = *bmp_image++; gop_blt->Green = *bmp_image++; - gop_blt->Red = *bmp_image; + gop_blt->Red = *bmp_image; break; /* Convert 32 bit to 24bit bmp - just ignore the final byte of each pixel */ case 32: - gop_blt->Blue = *bmp_image++; + gop_blt->Blue = *bmp_image++; gop_blt->Green = *bmp_image++; - gop_blt->Red = *bmp_image++; + gop_blt->Red = *bmp_image++; break; /* Other bit format of BMP is not supported. */