[U-Boot] [PATCH 1/1] efi_loader: use __always_inline for pixel conversion

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Mar 16 17:14:27 UTC 2018


We optimize for size suing -Os so gcc might ignore 'inline'.
Pixel conversions are called so often that we always want to inline them.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/efi_loader/efi_gop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 7b76e49ab0..363ccbb789 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -56,7 +56,7 @@ static efi_status_t EFIAPI gop_set_mode(struct efi_gop *this, u32 mode_number)
 	return EFI_EXIT(EFI_SUCCESS);
 }
 
-static inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid)
+static __always_inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid)
 {
 	struct efi_gop_pixel blt = {
 		.reserved = 0,
@@ -70,7 +70,7 @@ static inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid)
 	return blt;
 }
 
-static inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt)
+static __always_inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt)
 {
 	return (u16)(blt->red   >> 3) << 11 |
 	       (u16)(blt->green >> 2) <<  5 |
-- 
2.16.2



More information about the U-Boot mailing list