Skip to content

Commit 454a348

Browse files
arndbhansendc
authored andcommitted
x86/platform: Avoid missing-prototype warnings for OLPC
There are two functions in the olpc platform that have no prototype: arch/x86/platform/olpc/olpc_dt.c:237:13: error: no previous prototype for 'olpc_dt_fixup' [-Werror=missing-prototypes] arch/x86/platform/olpc/olpc-xo1-pm.c:73:26: error: no previous prototype for 'xo1_do_sleep' [-Werror=missing-prototypes] The first one should just be marked 'static' as there are no other callers, while the second one is called from assembler and is just a false-positive warning that can be silenced by adding a prototype. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://lore.kernel.org/all/20230516193549.544673-21-arnd%40kernel.org
1 parent 4d312ac commit 454a348

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

arch/x86/platform/olpc/olpc_dt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int __init olpc_dt_compatible_match(phandle node, const char *compat)
234234
return 0;
235235
}
236236

237-
void __init olpc_dt_fixup(void)
237+
static void __init olpc_dt_fixup(void)
238238
{
239239
phandle node;
240240
u32 board_rev;

include/linux/olpc-ec.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ extern int olpc_ec_sci_query(u16 *sci_value);
5656

5757
extern bool olpc_ec_wakeup_available(void);
5858

59+
asmlinkage int xo1_do_sleep(u8 sleep_state);
60+
5961
#else
6062

6163
static inline int olpc_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *outbuf,

0 commit comments

Comments
 (0)