From: Thomas Zimmermann <tzimmermann@suse.de>
To: Helge Deller <deller@gmx.de>,
gregkh@linuxfoundation.org, sam@ravnborg.org
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 13/13] lib/fonts: Remove internal symbols and macros from public header file
Date: Mon, 2 Mar 2026 14:45:29 +0100 [thread overview]
Message-ID: <d251b638-2323-4d14-af14-2f15ee826a9a@suse.de> (raw)
In-Reply-To: <d8633caa-c01c-433c-8dd3-f300dac53a0b@gmx.de>
Am 23.02.26 um 16:05 schrieb Helge Deller:
> On 2/18/26 09:16, Thomas Zimmermann wrote:
>> diff --git a/include/linux/font.h b/include/linux/font.h
>> index 4ff956a1cd0a..6e9a4c93b47b 100644
>> --- a/include/linux/font.h
>> +++ b/include/linux/font.h
>> @@ -92,20 +92,12 @@ struct font_desc {
>> #define FONT6x8_IDX 12
>> #define TER10x18_IDX 13
>> -extern const struct font_desc font_vga_8x8,
>> - font_vga_8x16,
>> - font_pearl_8x8,
>> - font_vga_6x11,
>> - font_7x14,
>> - font_10x18,
>> - font_sun_8x16,
>> - font_sun_12x22,
>> - font_acorn_8x8,
>> - font_mini_4x6,
>> - font_6x10,
>> - font_ter_16x32,
>> - font_6x8,
>> - font_ter_10x18;
>> +#if defined(CONFIG_FONT_8x8)
>> +extern const struct font_desc font_vga_8x8;
>> +#endif
>> +#if defined(CONFIG_FONT_8x16)
>> +extern const struct font_desc font_vga_8x16;
>> +#endif
>
> I suggest not to use all those #ifdef(CONFIG_XXX) in the header files.
> They are not necessary, and trigger a rebuild of a whole lot C-files
> in case one single CONFIG option is changed.
> Instead use it in the C-files only.
> That way (re-)compilation is faster and you still get a link/build error
> when a symbol is used although the config option is not set.
Ok. I'll send out an update in a bit.
>
>> diff --git a/lib/fonts/font.h b/lib/fonts/font.h
>> new file mode 100644
>> index 000000000000..00f65a3da5c2
>> --- /dev/null
>> +++ b/lib/fonts/font.h
>> @@ -0,0 +1,52 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +
>> +#ifndef _LIB_FONTS_FONT_H
>> +#define _LIB_FONTS_FONT_H
>> +
>> +#include <linux/font.h>
>> +
>> +#if defined(CONFIG_FONT_PEARL_8x8)
>> +extern const struct font_desc font_pearl_8x8;
>> +#endif
>> +#if defined(CONFIG_FONT_6x11)
>> +extern const struct font_desc font_vga_6x11;
>> +#endif
> ...
> same here...
>
> Helge
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-03-02 13:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 8:15 [PATCH 00/13] vc,fbcon,fonts: Proper handling of font data Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 01/13] fbdev: Declare src parameter of fb_pad_ helpers as constant Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 02/13] vt: Remove trailing whitespaces Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 03/13] vt: Store font in struct vc_font Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 04/13] vt: Calculate font-buffer size with vc_font_size() Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 05/13] lib/fonts: Remove trailing whitespaces Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 06/13] lib/fonts: Remove FNTCHARCNT() Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 07/13] lib/fonts: Store font data as font_data_t; update consoles Thomas Zimmermann
2026-02-18 8:15 ` [PATCH 08/13] lib/fonts: Read font size with font_data_size() Thomas Zimmermann
2026-02-18 8:16 ` [PATCH 09/13] lib/fonts: Compare font data for equality with font_data_is_equal() Thomas Zimmermann
2026-02-18 8:16 ` [PATCH 10/13] lib/fonts: Manage font-data lifetime with font_data_get/_put() Thomas Zimmermann
2026-02-18 8:16 ` [PATCH 11/13] lib/fonts: Create font_data_t from struct console_font with font_data_import() Thomas Zimmermann
2026-02-18 8:16 ` [PATCH 12/13] lib/fonts: Store font data for user space with font_data_export() Thomas Zimmermann
2026-02-18 8:16 ` [PATCH 13/13] lib/fonts: Remove internal symbols and macros from public header file Thomas Zimmermann
2026-02-18 21:47 ` kernel test robot
2026-02-19 2:08 ` kernel test robot
2026-02-23 15:05 ` Helge Deller
2026-03-02 13:45 ` Thomas Zimmermann [this message]
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=d251b638-2323-4d14-af14-2f15ee826a9a@suse.de \
--to=tzimmermann@suse.de \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--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
all inboxes | Powered by JetHome®