From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-mips@linux-mips.org>,
Huacai Chen <chenhc@lemote.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 3/4] mips: make loongsoon serial driver explicitly modular
Date: Tue, 9 Jun 2015 19:15:28 -0400 [thread overview]
Message-ID: <20150609231528.GQ7125@windriver.com> (raw)
In-Reply-To: <20150609073533.GB2753@linux-mips.org>
[Re: [PATCH 3/4] mips: make loongsoon serial driver explicitly modular] On 09/06/2015 (Tue 09:35) Ralf Baechle wrote:
> On Tue, Jun 02, 2015 at 04:16:07PM -0400, Paul Gortmaker wrote:
>
> Ccing a few people with interest in Loongson stuff.
>
> > 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.
>
> Following up on our IRC discussion - your commit would result in
> platform device registrations from module code which opens another can
> of worms. This and the whole philosophy of platforms devices to show
> what devices do exist in a system, not which drivers are configured.
> So just always build serial.c into the kernel.
>
> A related issue is uart_base.o which I think is required to register
> properly initialized platform devices. It depends on
> CONFIG_LOONGSON_UART_BASE but probably should also be put into the
> kernel whenever we register the UART platform devices and that's
> always.
>
> Ralf
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
I've dropped my change in favour of this one, and crafted up a commit
log from this e-mail exchange as follows:
https://git.kernel.org/cgit/linux/kernel/git/paulg/linux.git/commit/?h=init-v4.1-rc6&id=5eee56adcce9b0baf2da55c0bff88eb0f1c0eb61
Assuming nobody else has an issue with it, then we should be done here
(i.e. it doesn't even need to be in mips-next; it just needs to be here
in this series so we don't get bisect fails introduced.)
Thanks,
Paul.
--
>
> diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile
> index e70c33f..f2e8153 100644
> --- a/arch/mips/loongson/common/Makefile
> +++ b/arch/mips/loongson/common/Makefile
> @@ -3,15 +3,13 @@
> #
>
> obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
> - bonito-irq.o mem.o machtype.o platform.o
> + bonito-irq.o mem.o machtype.o platform.o serial.o
> obj-$(CONFIG_PCI) += pci.o
>
> #
> # Serial port support
> #
> obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
> -loongson-serial-$(CONFIG_SERIAL_8250) := serial.o
> -obj-y += $(loongson-serial-m) $(loongson-serial-y)
> obj-$(CONFIG_LOONGSON_UART_BASE) += uart_base.o
> obj-$(CONFIG_LOONGSON_MC146818) += rtc.o
>
WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
Huacai Chen <chenhc@lemote.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 3/4] mips: make loongsoon serial driver explicitly modular
Date: Tue, 9 Jun 2015 19:15:28 -0400 [thread overview]
Message-ID: <20150609231528.GQ7125@windriver.com> (raw)
Message-ID: <20150609231528.ph2P8ybMSP2qMlJPd-SatqvKBCkWmXAXkT6ltYCN97Y@z> (raw)
In-Reply-To: <20150609073533.GB2753@linux-mips.org>
[Re: [PATCH 3/4] mips: make loongsoon serial driver explicitly modular] On 09/06/2015 (Tue 09:35) Ralf Baechle wrote:
> On Tue, Jun 02, 2015 at 04:16:07PM -0400, Paul Gortmaker wrote:
>
> Ccing a few people with interest in Loongson stuff.
>
> > 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.
>
> Following up on our IRC discussion - your commit would result in
> platform device registrations from module code which opens another can
> of worms. This and the whole philosophy of platforms devices to show
> what devices do exist in a system, not which drivers are configured.
> So just always build serial.c into the kernel.
>
> A related issue is uart_base.o which I think is required to register
> properly initialized platform devices. It depends on
> CONFIG_LOONGSON_UART_BASE but probably should also be put into the
> kernel whenever we register the UART platform devices and that's
> always.
>
> Ralf
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
I've dropped my change in favour of this one, and crafted up a commit
log from this e-mail exchange as follows:
https://git.kernel.org/cgit/linux/kernel/git/paulg/linux.git/commit/?h=init-v4.1-rc6&id=5eee56adcce9b0baf2da55c0bff88eb0f1c0eb61
Assuming nobody else has an issue with it, then we should be done here
(i.e. it doesn't even need to be in mips-next; it just needs to be here
in this series so we don't get bisect fails introduced.)
Thanks,
Paul.
--
>
> diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile
> index e70c33f..f2e8153 100644
> --- a/arch/mips/loongson/common/Makefile
> +++ b/arch/mips/loongson/common/Makefile
> @@ -3,15 +3,13 @@
> #
>
> obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
> - bonito-irq.o mem.o machtype.o platform.o
> + bonito-irq.o mem.o machtype.o platform.o serial.o
> obj-$(CONFIG_PCI) += pci.o
>
> #
> # Serial port support
> #
> obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
> -loongson-serial-$(CONFIG_SERIAL_8250) := serial.o
> -obj-y += $(loongson-serial-m) $(loongson-serial-y)
> obj-$(CONFIG_LOONGSON_UART_BASE) += uart_base.o
> obj-$(CONFIG_LOONGSON_MC146818) += rtc.o
>
next prev parent reply other threads:[~2015-06-09 23:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 20:16 [PATCH 0/4] Relocate module code from init.h to module.h Paul Gortmaker
2015-06-02 20:16 ` Paul Gortmaker
2015-06-02 20:16 ` Paul Gortmaker
2015-06-02 20:16 ` [PATCH 1/4] x86: replace __init_or_module with __init in non-modular vsmp_64.c Paul Gortmaker
2015-06-02 20:16 ` [PATCH 2/4] arm: fix implicit #include <linux/init.h> in entry asm Paul Gortmaker
2015-06-02 20:16 ` Paul Gortmaker
2015-06-02 20:16 ` [PATCH 3/4] mips: make loongsoon serial driver explicitly modular Paul Gortmaker
2015-06-02 20:16 ` Paul Gortmaker
2015-06-02 21:47 ` Paul Bolle
2015-06-02 22:43 ` Paul Gortmaker
2015-06-02 22:43 ` Paul Gortmaker
2015-06-03 7:55 ` Ralf Baechle
2015-06-09 7:35 ` Ralf Baechle
2015-06-09 23:15 ` Paul Gortmaker [this message]
2015-06-09 23:15 ` Paul Gortmaker
2015-06-10 8:47 ` Ralf Baechle
2015-06-02 20:16 ` [PATCH 4/4] module: relocate module_init from init.h to module.h Paul Gortmaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150609231528.GQ7125@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=aaro.koskinen@iki.fi \
--cc=chenhc@lemote.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.