Skip to content

Commit 9522750

Browse files
Lee Jonesdanvet
authored andcommitted
Fonts: Replace discarded const qualifier
Commit 6735b46 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Fixes: 6735b46 ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts") Signed-off-by: Lee Jones <lee.jones@linaro.org> Co-developed-by: Peilin Ye <yepeilin.cs@gmail.com> Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20201102183242.2031659-1-yepeilin.cs@gmail.com
1 parent 077aa5c commit 9522750

13 files changed

Lines changed: 13 additions & 13 deletions

lib/fonts/font_10x18.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#define FONTDATAMAX 9216
1010

11-
static struct font_data fontdata_10x18 = {
11+
static const struct font_data fontdata_10x18 = {
1212
{ 0, 0, FONTDATAMAX, 0 }, {
1313
/* 0 0x00 '^@' */
1414
0x00, 0x00, /* 0000000000 */

lib/fonts/font_6x10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define FONTDATAMAX 2560
55

6-
static struct font_data fontdata_6x10 = {
6+
static const struct font_data fontdata_6x10 = {
77
{ 0, 0, FONTDATAMAX, 0 }, {
88
/* 0 0x00 '^@' */
99
0x00, /* 00000000 */

lib/fonts/font_6x11.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#define FONTDATAMAX (11*256)
1111

12-
static struct font_data fontdata_6x11 = {
12+
static const struct font_data fontdata_6x11 = {
1313
{ 0, 0, FONTDATAMAX, 0 }, {
1414
/* 0 0x00 '^@' */
1515
0x00, /* 00000000 */

lib/fonts/font_6x8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define FONTDATAMAX 2048
55

6-
static struct font_data fontdata_6x8 = {
6+
static const struct font_data fontdata_6x8 = {
77
{ 0, 0, FONTDATAMAX, 0 }, {
88
/* 0 0x00 '^@' */
99
0x00, /* 000000 */

lib/fonts/font_7x14.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#define FONTDATAMAX 3584
1010

11-
static struct font_data fontdata_7x14 = {
11+
static const struct font_data fontdata_7x14 = {
1212
{ 0, 0, FONTDATAMAX, 0 }, {
1313
/* 0 0x00 '^@' */
1414
0x00, /* 0000000 */

lib/fonts/font_8x16.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#define FONTDATAMAX 4096
1212

13-
static struct font_data fontdata_8x16 = {
13+
static const struct font_data fontdata_8x16 = {
1414
{ 0, 0, FONTDATAMAX, 0 }, {
1515
/* 0 0x00 '^@' */
1616
0x00, /* 00000000 */

lib/fonts/font_8x8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#define FONTDATAMAX 2048
1111

12-
static struct font_data fontdata_8x8 = {
12+
static const struct font_data fontdata_8x8 = {
1313
{ 0, 0, FONTDATAMAX, 0 }, {
1414
/* 0 0x00 '^@' */
1515
0x00, /* 00000000 */

lib/fonts/font_acorn_8x8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#define FONTDATAMAX 2048
77

8-
static struct font_data acorndata_8x8 = {
8+
static const struct font_data acorndata_8x8 = {
99
{ 0, 0, FONTDATAMAX, 0 }, {
1010
/* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ^@ */
1111
/* 01 */ 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, /* ^A */

lib/fonts/font_mini_4x6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ __END__;
4343

4444
#define FONTDATAMAX 1536
4545

46-
static struct font_data fontdata_mini_4x6 = {
46+
static const struct font_data fontdata_mini_4x6 = {
4747
{ 0, 0, FONTDATAMAX, 0 }, {
4848
/*{*/
4949
/* Char 0: ' ' */

lib/fonts/font_pearl_8x8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#define FONTDATAMAX 2048
1616

17-
static struct font_data fontdata_pearl8x8 = {
17+
static const struct font_data fontdata_pearl8x8 = {
1818
{ 0, 0, FONTDATAMAX, 0 }, {
1919
/* 0 0x00 '^@' */
2020
0x00, /* 00000000 */

0 commit comments

Comments
 (0)