Commit 9522750c authored by Lee Jones's avatar Lee Jones Committed by Daniel Vetter
Browse files

Fonts: Replace discarded const qualifier



Commit 6735b463 ("Fonts: Support FONT_EXTRA_WORDS macros for built-in
fonts") introduced the following error when building rpc_defconfig (only
this build appears to be affected):

 `acorndata_8x8' referenced in section `.text' of arch/arm/boot/compressed/ll_char_wr.o:
    defined in discarded section `.data' of arch/arm/boot/compressed/font.o
 `acorndata_8x8' referenced in section `.data.rel.ro' of arch/arm/boot/compressed/font.o:
    defined in discarded section `.data' of arch/arm/boot/compressed/font.o
 make[3]: *** [/scratch/linux/arch/arm/boot/compressed/Makefile:191: arch/arm/boot/compressed/vmlinux] Error 1
 make[2]: *** [/scratch/linux/arch/arm/boot/Makefile:61: arch/arm/boot/compressed/vmlinux] Error 2
 make[1]: *** [/scratch/linux/arch/arm/Makefile:317: zImage] Error 2

The .data section is discarded at link time.  Reinstating acorndata_8x8 as
const ensures it is still available after linking.  Do the same for the
other 12 built-in fonts as well, for consistency purposes.

Cc: <stable@vger.kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 6735b463 ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts")
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Co-developed-by: default avatarPeilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: default avatarPeilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201102183242.2031659-1-yepeilin.cs@gmail.com
parent 077aa5c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

#define FONTDATAMAX 9216

static struct font_data fontdata_10x18 = {
static const struct font_data fontdata_10x18 = {
	{ 0, 0, FONTDATAMAX, 0 }, {
	/* 0 0x00 '^@' */
	0x00, 0x00, /* 0000000000 */
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

#define FONTDATAMAX 2560

static struct font_data fontdata_6x10 = {
static const struct font_data fontdata_6x10 = {
	{ 0, 0, FONTDATAMAX, 0 }, {
	/* 0 0x00 '^@' */
	0x00, /* 00000000 */
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@

#define FONTDATAMAX (11*256)

static struct font_data fontdata_6x11 = {
static const struct font_data fontdata_6x11 = {
	{ 0, 0, FONTDATAMAX, 0 }, {
	/* 0 0x00 '^@' */
	0x00, /* 00000000 */
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

#define FONTDATAMAX 2048

static struct font_data fontdata_6x8 = {
static const struct font_data fontdata_6x8 = {
	{ 0, 0, FONTDATAMAX, 0 }, {
	/* 0 0x00 '^@' */
	0x00, /* 000000 */
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

#define FONTDATAMAX 3584

static struct font_data fontdata_7x14 = {
static const struct font_data fontdata_7x14 = {
	{ 0, 0, FONTDATAMAX, 0 }, {
	/* 0 0x00 '^@' */
	0x00, /* 0000000 */
Loading