From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 22 Jan 2014 16:25:50 +0100 (CET) Received: from nbd.name ([46.4.11.11]:60130 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6825759AbaAVPZrPoEs1 (ORCPT ); Wed, 22 Jan 2014 16:25:47 +0100 Message-ID: <52DFE2EE.8040108@phrozen.org> Date: Wed, 22 Jan 2014 16:25:34 +0100 From: John Crispin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Paul Gortmaker CC: fengguang.wu@intel.com, linux-serial@vger.kernel.org, Ralf Baechle , linux-mips@linux-mips.org Subject: Re: [PATCH] mips: make loongsoon serial driver explicitly modular References: <52df9ab1.ahF1zl0PTutzrviC%fengguang.wu@intel.com> <1390403871-16809-1-git-send-email-paul.gortmaker@windriver.com> In-Reply-To: <1390403871-16809-1-git-send-email-paul.gortmaker@windriver.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 39065 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: john@phrozen.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Hi, On 22/01/2014 16:17, Paul Gortmaker wrote: > The file looks as if it is non-modular, but it piggy-backs > off CONFIG_SERIAL_8250 which is tristate. If set to "=m" > we will get this after the init/module header cleanup: > > arch/mips/loongson/common/serial.c:76:1: error: data definition has no type or storage class [-Werror] > arch/mips/loongson/common/serial.c:76:1: error: type defaults to 'int' in declaration of 'device_initcall' [-Werror=implicit-int] > arch/mips/loongson/common/serial.c:76:1: error: parameter names (without types) in function declaration [-Werror] > arch/mips/loongson/common/serial.c:58:19: error: 'serial_init' defined but not used [-Werror=unused-function] > cc1: all warnings being treated as errors > make[3]: *** [arch/mips/loongson/common/serial.o] Error 1 > > Make it clearly modular, and add a module_exit function, > so that we avoid the above breakage. > > Reported-by: kbuild test robot > Cc: Ralf Baechle > Cc: linux-mips@linux-mips.org > Signed-off-by: Paul Gortmaker Acked-by: John Crispin as this patch is already in Paul's tree, i will set it to "other maintainer" in the linux-mips patchwork. Thanks, John > --- > > [patch added to init cleanup series: > http://git.kernel.org/cgit/linux/kernel/git/paulg/init.git/ ] > > arch/mips/loongson/common/serial.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/loongson/common/serial.c b/arch/mips/loongson/common/serial.c > index 5f2b78a..4d0922f 100644 > --- a/arch/mips/loongson/common/serial.c > +++ b/arch/mips/loongson/common/serial.c > @@ -11,7 +11,7 @@ > */ > > #include > -#include > +#include > #include > > #include > @@ -72,5 +72,10 @@ static int __init serial_init(void) > > return platform_device_register(&uart8250_device); > } > +module_init(serial_init); > > -device_initcall(serial_init); > +static void __init serial_exit(void) > +{ > + platform_device_unregister(&uart8250_device); > +} > +module_exit(serial_exit);