From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752838AbcC1OWZ (ORCPT ); Mon, 28 Mar 2016 10:22:25 -0400 Received: from e18.ny.us.ibm.com ([129.33.205.208]:46817 "EHLO e18.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbcC1OWY (ORCPT ); Mon, 28 Mar 2016 10:22:24 -0400 X-IBM-Helo: d01dlp01.pok.ibm.com X-IBM-MailFrom: nfont@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] powerpc: make kernel/nvram_64.c explicitly non-modular To: Paul Gortmaker , linux-kernel@vger.kernel.org References: <1459116497-19991-1-git-send-email-paul.gortmaker@windriver.com> <1459116497-19991-3-git-send-email-paul.gortmaker@windriver.com> Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Hari Bathini , Andrzej Hajda , Anton Blanchard , linuxppc-dev@lists.ozlabs.org From: Nathan Fontenot Message-ID: <56F93E18.7000809@linux.vnet.ibm.com> Date: Mon, 28 Mar 2016 09:22:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1459116497-19991-3-git-send-email-paul.gortmaker@windriver.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16032814-0045-0000-0000-000003C3B180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/27/2016 05:08 PM, Paul Gortmaker wrote: > The Makefile/Kconfig currently controlling compilation of this code is: > > obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ > signal_64.o ptrace32.o \ > paca.o nvram_64.o firmware.o > > arch/powerpc/platforms/Kconfig.cputype:config PPC64 > arch/powerpc/platforms/Kconfig.cputype: bool "64-bit kernel" > > ...meaning that it currently is not being built as a module by anyone. > > Lets remove the modular code that is essentially orphaned, so that > when reading the driver there is no doubt it is builtin-only. > > Since module_init translates to device_initcall in the non-modular > case, the init ordering remains unchanged with this commit. > > We don't replace module.h with init.h since the file already has that. > > We delete the MODULE_LICENSE tag since that information is already > contained at the top of the file in the comments. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Hari Bathini > Cc: Nathan Fontenot > Cc: Andrzej Hajda > Cc: Anton Blanchard > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Paul Gortmaker > --- I think at some point in the past we thought this may be useful as a module but I'm not sure it has ever been used that way. Reviewed-by: Nathan Fontenot > arch/powerpc/kernel/nvram_64.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c > index 0cab9e8c3794..856f9a7944cd 100644 > --- a/arch/powerpc/kernel/nvram_64.c > +++ b/arch/powerpc/kernel/nvram_64.c > @@ -15,8 +15,6 @@ > * parsing code. > */ > > -#include > - > #include > #include > #include > @@ -1231,12 +1229,4 @@ static int __init nvram_init(void) > > return rc; > } > - > -static void __exit nvram_cleanup(void) > -{ > - misc_deregister( &nvram_dev ); > -} > - > -module_init(nvram_init); > -module_exit(nvram_cleanup); > -MODULE_LICENSE("GPL"); > +device_initcall(nvram_init); >