Skip to content

Commit

Permalink
Fonts: Replace discarded const qualifier
Browse files Browse the repository at this point in the history
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: <[email protected]>
Cc: Russell King <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Fixes: 6735b46 ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts")
Signed-off-by: Lee Jones <[email protected]>
Co-developed-by: Peilin Ye <[email protected]>
Signed-off-by: Peilin Ye <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
Lee Jones authored and danvet committed Nov 3, 2020
1 parent 077aa5c commit 9522750
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/fonts/font_10x18.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_6x10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_6x11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_6x8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_7x14.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_8x16.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#define FONTDATAMAX 4096

static struct font_data fontdata_8x16 = {
static const struct font_data fontdata_8x16 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/* 0 0x00 '^@' */
0x00, /* 00000000 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_8x8.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#define FONTDATAMAX 2048

static struct font_data fontdata_8x8 = {
static const struct font_data fontdata_8x8 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/* 0 0x00 '^@' */
0x00, /* 00000000 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_acorn_8x8.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define FONTDATAMAX 2048

static struct font_data acorndata_8x8 = {
static const struct font_data acorndata_8x8 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ^@ */
/* 01 */ 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, /* ^A */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_mini_4x6.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ __END__;

#define FONTDATAMAX 1536

static struct font_data fontdata_mini_4x6 = {
static const struct font_data fontdata_mini_4x6 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/*{*/
/* Char 0: ' ' */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_pearl_8x8.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define FONTDATAMAX 2048

static struct font_data fontdata_pearl8x8 = {
static const struct font_data fontdata_pearl8x8 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/* 0 0x00 '^@' */
0x00, /* 00000000 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_sun12x22.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define FONTDATAMAX 11264

static struct font_data fontdata_sun12x22 = {
static const struct font_data fontdata_sun12x22 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/* 0 0x00 '^@' */
0x00, 0x00, /* 000000000000 */
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_sun8x16.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define FONTDATAMAX 4096

static struct font_data fontdata_sun8x16 = {
static const struct font_data fontdata_sun8x16 = {
{ 0, 0, FONTDATAMAX, 0 }, {
/* */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/* */ 0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00,
Expand Down
2 changes: 1 addition & 1 deletion lib/fonts/font_ter16x32.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#define FONTDATAMAX 16384

static struct font_data fontdata_ter16x32 = {
static const struct font_data fontdata_ter16x32 = {
{ 0, 0, FONTDATAMAX, 0 }, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x7f, 0xfc,
Expand Down

0 comments on commit 9522750

Please sign in to comment.