Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev/core: Remove empty internal helpers from fb_logo.c

Remove the two empty helpers for the case the CONFIG_FB_LOGO_EXTRA
has not been set. They are internal functions and only called once.
Providing empty replacements seems like overkill. Instead protect
the call sites with a test for CONFIG_FB_LOGO_EXTRA.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230907085408.9354-7-tzimmermann@suse.de

+6 -16
+6 -16
drivers/video/fbdev/core/fb_logo.c
··· 413 413 414 414 return y; 415 415 } 416 - 417 - #else /* !CONFIG_FB_LOGO_EXTRA */ 418 - 419 - static inline int fb_prepare_extra_logos(struct fb_info *info, 420 - unsigned int height, 421 - unsigned int yres) 422 - { 423 - return height; 424 - } 425 - 426 - static inline int fb_show_extra_logos(struct fb_info *info, int y, int rotate) 427 - { 428 - return y; 429 - } 430 - 431 416 #endif /* CONFIG_FB_LOGO_EXTRA */ 432 417 433 418 int fb_prepare_logo(struct fb_info *info, int rotate) ··· 483 498 height = fb_logo.logo->height; 484 499 if (fb_center_logo) 485 500 height += (yres - fb_logo.logo->height) / 2; 501 + #ifdef CONFIG_FB_LOGO_EXTRA 502 + height = fb_prepare_extra_logos(info, height, yres); 503 + #endif 486 504 487 - return fb_prepare_extra_logos(info, height, yres); 505 + return height; 488 506 } 489 507 490 508 int fb_show_logo(struct fb_info *info, int rotate) ··· 500 512 501 513 count = fb_logo_count < 0 ? num_online_cpus() : fb_logo_count; 502 514 y = fb_show_logo_line(info, rotate, fb_logo.logo, 0, count); 515 + #ifdef CONFIG_FB_LOGO_EXTRA 503 516 y = fb_show_extra_logos(info, y, rotate); 517 + #endif 504 518 505 519 return y; 506 520 }