lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 May 2020 10:15:01 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Huacai Chen <chenhc@...ote.com>,
        Jiaxun Yang <jiaxun.yang@...goat.com>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xuefeng Li <lixuefeng@...ngson.cn>
Subject: [PATCH 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT

When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix
the following build errors:

  CC      arch/mips/kernel/8250-platform.o
arch/mips/kernel/8250-platform.c:42:1: error: data definition has no type or storage class [-Werror]
 module_init(uart8250_init);
 ^
arch/mips/kernel/8250-platform.c:42:1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int]
arch/mips/kernel/8250-platform.c:42:1: error: parameter names (without types) in function declaration [-Werror]
arch/mips/kernel/8250-platform.c:44:15: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_AUTHOR("Ralf Baechle <ralf@...ux-mips.org>");
               ^
arch/mips/kernel/8250-platform.c:45:16: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_LICENSE("GPL");
                ^
arch/mips/kernel/8250-platform.c:46:20: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_DESCRIPTION("Generic 8250 UART probe driver");
                    ^
arch/mips/kernel/8250-platform.c:37:81: error: ‘uart8250_init’ defined but not used [-Werror=unused-function]
 static int __init uart8250_init(void)
                                                                                 ^
cc1: all warnings being treated as errors
scripts/Makefile.build:267: recipe for target 'arch/mips/kernel/8250-platform.o' failed
make[2]: *** [arch/mips/kernel/8250-platform.o] Error 1

Fixes: 848484e2c412 ("mips: remove needless include of module.h from core kernel files.")
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
 arch/mips/kernel/8250-platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/kernel/8250-platform.c b/arch/mips/kernel/8250-platform.c
index 5c6b2ab..cbf3fe2 100644
--- a/arch/mips/kernel/8250-platform.c
+++ b/arch/mips/kernel/8250-platform.c
@@ -5,6 +5,7 @@
  *
  * Copyright (C) 2007 Ralf Baechle (ralf@...ux-mips.org)
  */
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-- 
2.1.0

Powered by blists - more mailing lists