Skip to content

Commit c9a1d4f

Browse files
arndbRussell King (Oracle)
authored andcommitted
ARM: 9310/1: xip-kernel: add __inflate_kernel_data prototype
The kernel .data decompression is called from assembler, so it does not need a prototype, but adding one avoids this W=1 warning: arch/arm/kernel/head-inflate-data.c:35:12: error: no previous prototype for '__inflate_kernel_data' [-Werror=missing-prototypes] The same file contains a few extern declarations for assembler symbols, move those into the header as well for consistency. Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent be0796b commit c9a1d4f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

arch/arm/kernel/head-inflate-data.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88

99
#include <linux/init.h>
1010
#include <linux/zutil.h>
11+
#include "head.h"
1112

1213
/* for struct inflate_state */
1314
#include "../../../lib/zlib_inflate/inftrees.h"
1415
#include "../../../lib/zlib_inflate/inflate.h"
1516
#include "../../../lib/zlib_inflate/infutil.h"
1617

17-
extern char __data_loc[];
18-
extern char _edata_loc[];
19-
extern char _sdata[];
20-
2118
/*
2219
* This code is called very early during the boot process to decompress
2320
* the .data segment stored compressed in ROM. Therefore none of the global

arch/arm/kernel/head.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
3+
extern char __data_loc[];
4+
extern char _edata_loc[];
5+
extern char _sdata[];
6+
7+
int __init __inflate_kernel_data(void);

0 commit comments

Comments
 (0)