From: Thomas Zimmermann <tzimmermann@suse.de>
To: deller@gmx.de, daniel@ffwll.ch, javierm@redhat.com,
sam@ravnborg.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 6/7] fbdev/core: Remove empty internal helpers from fb_logo.c
Date: Tue, 29 Aug 2023 16:15:45 +0200 [thread overview]
Message-ID: <20230829142109.4521-7-tzimmermann@suse.de> (raw)
In-Reply-To: <20230829142109.4521-1-tzimmermann@suse.de>
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>
---
drivers/video/fbdev/core/fb_logo.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/drivers/video/fbdev/core/fb_logo.c b/drivers/video/fbdev/core/fb_logo.c
index cde0a330b2ad..9cff78332858 100644
--- a/drivers/video/fbdev/core/fb_logo.c
+++ b/drivers/video/fbdev/core/fb_logo.c
@@ -412,21 +412,6 @@ static int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
return y;
}
-
-#else /* !CONFIG_FB_LOGO_EXTRA */
-
-static inline int fb_prepare_extra_logos(struct fb_info *info,
- unsigned int height,
- unsigned int yres)
-{
- return height;
-}
-
-static inline int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
-{
- return y;
-}
-
#endif /* CONFIG_FB_LOGO_EXTRA */
int fb_prepare_logo(struct fb_info *info, int rotate)
@@ -497,8 +482,11 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
height = fb_logo.logo->height;
if (fb_center_logo)
height += (yres - fb_logo.logo->height) / 2;
+#ifdef CONFIG_FB_LOGO_EXTRA
+ height = fb_prepare_extra_logos(info, height, yres);
+#endif
- return fb_prepare_extra_logos(info, height, yres);
+ return height;
}
EXPORT_SYMBOL(fb_prepare_logo);
@@ -512,7 +500,9 @@ int fb_show_logo(struct fb_info *info, int rotate)
count = fb_logo_count < 0 ? num_online_cpus() : fb_logo_count;
y = fb_show_logo_line(info, rotate, fb_logo.logo, 0, count);
+#ifdef CONFIG_FB_LOGO_EXTRA
y = fb_show_extra_logos(info, y, rotate);
+#endif
return y;
}
--
2.41.0
next prev parent reply other threads:[~2023-08-29 14:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 14:15 [PATCH 0/7] fbdev: Split off code for boot-up logo Thomas Zimmermann
2023-08-29 14:15 ` [PATCH 1/7] fbdev/au1200fb: Do not display " Thomas Zimmermann
2023-09-06 9:45 ` Javier Martinez Canillas
2023-08-29 14:15 ` [PATCH 2/7] fbdev/mmp/mmpfb: " Thomas Zimmermann
2023-09-06 9:54 ` Javier Martinez Canillas
2023-09-07 6:56 ` Thomas Zimmermann
2023-08-29 14:15 ` [PATCH 3/7] fbdev/core: Fix style of code for " Thomas Zimmermann
2023-09-06 9:59 ` Javier Martinez Canillas
2023-08-29 14:15 ` [PATCH 4/7] fbdev/core: Move logo functions into separate source file Thomas Zimmermann
2023-08-29 15:55 ` kernel test robot
2023-09-01 20:09 ` kernel test robot
2023-09-01 20:20 ` kernel test robot
2023-09-06 10:10 ` Javier Martinez Canillas
2023-08-29 14:15 ` [PATCH 5/7] fbdev/core: Build fb_logo iff CONFIG_LOGO has been selected Thomas Zimmermann
2023-09-01 8:22 ` Helge Deller
2023-09-04 7:08 ` Thomas Zimmermann
2023-09-07 8:06 ` Thomas Zimmermann
2023-09-06 10:12 ` Javier Martinez Canillas
2023-09-07 8:07 ` Thomas Zimmermann
2023-08-29 14:15 ` Thomas Zimmermann [this message]
2023-09-06 10:13 ` [PATCH 6/7] fbdev/core: Remove empty internal helpers from fb_logo.c Javier Martinez Canillas
2023-08-29 14:15 ` [PATCH 7/7] fbdev/core: Clean up include statements in fbmem.c Thomas Zimmermann
2023-09-06 10:13 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230829142109.4521-7-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).