From 9eeb1a299d40a4587d5b3c2b87ae8022998cf766 Mon Sep 17 00:00:00 2001 From: Nikhil M Jain Date: Thu, 20 Apr 2023 17:41:12 +0530 Subject: common: Replace #ifdef and #if with if's Avoid using preprocessor compilation directives and instead use simple logical expressions for better readability since compiler will anyway optimize out the respective code block if condition is not satisfied. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass Reviewed-by: Devarsh Thakkar --- include/splash.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include') diff --git a/include/splash.h b/include/splash.h index b6a100ffc3c..c3922375987 100644 --- a/include/splash.h +++ b/include/splash.h @@ -60,21 +60,8 @@ static inline int splash_source_load(struct splash_location *locations, #endif int splash_screen_prepare(void); - -#if CONFIG_IS_ENABLED(SPLASH_SCREEN_ALIGN) void splash_get_pos(int *x, int *y); -#else -static inline void splash_get_pos(int *x, int *y) { } -#endif - -#if CONFIG_IS_ENABLED(SPLASH_SCREEN) && CONFIG_IS_ENABLED(BMP) int splash_display(void); -#else -static inline int splash_display(void) -{ - return -ENOSYS; -} -#endif #define BMP_ALIGN_CENTER 0x7FFF -- cgit v1.3.1