From: Thomas Zimmermann <tzimmermann@suse.de>
To: Helge Deller <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
Subject: Re: [PATCH 5/7] fbdev/core: Build fb_logo iff CONFIG_LOGO has been selected
Date: Mon, 4 Sep 2023 09:08:31 +0200 [thread overview]
Message-ID: <a0f9f34f-0c4f-9fc8-83ef-899a8f368529@suse.de> (raw)
In-Reply-To: <bf8e8402-2def-a365-18be-3b426cb1830a@gmx.de>
[-- Attachment #1.1: Type: text/plain, Size: 2037 bytes --]
Hi
Am 01.09.23 um 10:22 schrieb Helge Deller:
> On 8/29/23 16:15, Thomas Zimmermann wrote:
>> Only build fb_logo.c if CONFIG_LOGO has been selected. Otherwise
>> provide empty implementations of the contained interfaces and avoid
>> using the exported variables.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ...
>> diff --git a/drivers/video/fbdev/core/fbcon.c
>> b/drivers/video/fbdev/core/fbcon.c
>> index f157a5a1dffc..24b038510a71 100644
>> --- a/drivers/video/fbdev/core/fbcon.c
>> +++ b/drivers/video/fbdev/core/fbcon.c
>> @@ -474,15 +474,19 @@ static int __init fb_console_setup(char *this_opt)
>>
>> if (!strncmp(options, "logo-pos:", 9)) {
>> options += 9;
>> +#ifdef CONFIG_LOGO
>> if (!strcmp(options, "center"))
>> fb_center_logo = true;
>> +#endif
>
> IMHO, *sometimes* it makes sense to not use #ifdef and code it instead
> like this:
> if (IS_ENABLED(CONFIG_LOGO) &&
> !strcmp(options, "center"))
> ...
> That way the compiler will optimize that code away as well, but in
> addition it will compile-check that you have correct coding independend
> if CONFIG_LOGO is set or not.
Good idea. I'll change it. The IS_ENABLED code is also easier to read IMHO.
Best regards
Thomas
>
>> continue;
>> }
>>
>> if (!strncmp(options, "logo-count:", 11)) {
>> options += 11;
>> +#ifdef CONFIG_LOGO
>> if (*options)
>> fb_logo_count = simple_strtol(options, &options, 0);
>> +#endif
>
> same here.
>
> Helge
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2023-09-04 7:08 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 [this message]
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 ` [PATCH 6/7] fbdev/core: Remove empty internal helpers from fb_logo.c Thomas Zimmermann
2023-09-06 10:13 ` 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=a0f9f34f-0c4f-9fc8-83ef-899a8f368529@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).