The new macro builtin_misc_device doesn't currently exist anywhere
other than Greg's char-misc tree. As such I was going to stagger
the patches containing users of it by a merge window to avoid any
dependency issues, but Greg offered to take the users in via the
char-misc tree which also solves the dependency issue (assuming
the blackfin and s390 people don't mind).
So these three patches are the ones from my queue that use the
new macro. Build tested for s390 and blackfin to ensure no typos
or implicit include issues inadvertently crept in.
We are simply replacing module_misc_device with the new
builtin_misc_device in code that is always built in due to
the Makefile/Kconfig settings controlling it. Along with that
we get rid of any other modular related references that are
inactive in the always non-modular case.
Paul.
---
Cc: Bas Vermeulen <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Matias Bjorling <[email protected]>
Cc: Michael Holzheu <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Paul Gortmaker (3):
lightnvm: make core.c explicitly non-modular
blackfin: make-bf561/coreb.c explicitly non-modular
s390: char: make slp_ctl explicitly non-modular
arch/blackfin/mach-bf561/coreb.c | 10 ++++------
drivers/lightnvm/core.c | 14 ++++++--------
drivers/s390/char/sclp_ctl.c | 4 ++--
3 files changed, 12 insertions(+), 16 deletions(-)
--
2.10.1
The Kconfig currently controlling compilation of this code is:
drivers/lightnvm/Kconfig:menuconfig NVM
drivers/lightnvm/Kconfig: bool "Open-Channel SSD target support"
...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_misc_driver translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
We replace module.h with moduleparam.h because this file still uses
module params to control behaviour.
Also note that MODULE_ALIAS is a no-op for non-modular code.
Cc: Matias Bjorling <[email protected]>
Signed-off-by: Paul Gortmaker <[email protected]>
---
drivers/lightnvm/core.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 1cac0f8bc0dc..2329f050ff82 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -22,7 +22,7 @@
#include <linux/types.h>
#include <linux/sem.h>
#include <linux/bitmap.h>
-#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/miscdevice.h>
#include <linux/lightnvm.h>
#include <linux/sched/sysctl.h>
@@ -889,6 +889,10 @@ static const struct kernel_param_ops nvm_configure_by_str_event_param_ops = {
.get = nvm_configure_get,
};
+/*
+ * Not available as modular, but easiest way to remain compatible with
+ * existing boot arg behaviour is to continue using module param here.
+ */
#undef MODULE_PARAM_PREFIX
#define MODULE_PARAM_PREFIX "lnvm."
@@ -1162,10 +1166,4 @@ static struct miscdevice _nvm_misc = {
.nodename = "lightnvm/control",
.fops = &_ctl_fops,
};
-module_misc_device(_nvm_misc);
-
-MODULE_ALIAS_MISCDEV(MISC_DYNAMIC_MINOR);
-
-MODULE_AUTHOR("Matias Bjorling <[email protected]>");
-MODULE_LICENSE("GPL v2");
-MODULE_VERSION("0.1");
+builtin_misc_device(_nvm_misc);
--
2.10.1
The Makefile currently controlling compilation of this code is obj-y,
meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular usage, so that when reading
the driver there is no doubt it is builtin-only.
Since module_misc_device translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Michael Holzheu <[email protected]>
Cc: [email protected]
Signed-off-by: Paul Gortmaker <[email protected]>
---
drivers/s390/char/sclp_ctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/char/sclp_ctl.c b/drivers/s390/char/sclp_ctl.c
index 554eaa1e347d..78a7e4f94721 100644
--- a/drivers/s390/char/sclp_ctl.c
+++ b/drivers/s390/char/sclp_ctl.c
@@ -10,7 +10,7 @@
#include <linux/uaccess.h>
#include <linux/miscdevice.h>
#include <linux/gfp.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/ioctl.h>
#include <linux/fs.h>
#include <asm/compat.h>
@@ -126,4 +126,4 @@ static struct miscdevice sclp_ctl_device = {
.name = "sclp",
.fops = &sclp_ctl_fops,
};
-module_misc_device(sclp_ctl_device);
+builtin_misc_device(sclp_ctl_device);
--
2.10.1
The Kconfig currently controlling compilation of this code is:
config BF561_COREB
bool "Enable Core B loader"
...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_misc_device translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.
Cc: Bas Vermeulen <[email protected]>
Cc: Steven Miao <[email protected]>
Signed-off-by: Paul Gortmaker <[email protected]>
---
arch/blackfin/mach-bf561/coreb.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index 8a2543c654b3..cf27554e76bf 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -1,5 +1,7 @@
/* Load firmware into Core B on a BF561
*
+ * Author: Bas Vermeulen <[email protected]>
+ *
* Copyright 2004-2009 Analog Devices Inc.
* Licensed under the GPL-2 or later.
*/
@@ -14,9 +16,9 @@
#include <linux/device.h>
#include <linux/fs.h>
+#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
-#include <linux/module.h>
#define CMD_COREB_START _IO('b', 0)
#define CMD_COREB_STOP _IO('b', 1)
@@ -59,8 +61,4 @@ static struct miscdevice coreb_dev = {
.name = "coreb",
.fops = &coreb_fops,
};
-module_misc_device(coreb_dev);
-
-MODULE_AUTHOR("Bas Vermeulen <[email protected]>");
-MODULE_DESCRIPTION("BF561 Core B Support");
-MODULE_LICENSE("GPL");
+builtin_misc_device(coreb_dev);
--
2.10.1
Hi Paul,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc3 next-20161028]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Paul-Gortmaker/lightnvm-make-core-c-explicitly-non-modular/20161030-044459
config: i386-randconfig-x073-201644 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
>> drivers/lightnvm/core.c:1169:1: warning: data definition has no type or storage class
builtin_misc_device(_nvm_misc);
^~~~~~~~~~~~~~~~~~~
>> drivers/lightnvm/core.c:1169:1: error: type defaults to 'int' in declaration of 'builtin_misc_device' [-Werror=implicit-int]
>> drivers/lightnvm/core.c:1169:1: warning: parameter names (without types) in function declaration
>> drivers/lightnvm/core.c:1163:26: warning: '_nvm_misc' defined but not used [-Wunused-variable]
static struct miscdevice _nvm_misc = {
^~~~~~~~~
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
Cyclomatic Complexity 1 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add
Cyclomatic Complexity 1 include/linux/list.h:__list_del
Cyclomatic Complexity 1 include/linux/list.h:list_del
Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
Cyclomatic Complexity 1 include/linux/slab.h:__kmalloc_node
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 3 include/linux/slab.h:kmalloc
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_node
Cyclomatic Complexity 1 include/linux/slab.h:kzalloc_node
Cyclomatic Complexity 1 include/linux/lightnvm.h:generic_to_dev_addr
Cyclomatic Complexity 1 include/linux/lightnvm.h:dev_to_generic_addr
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_dev_dma_alloc
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_dev_dma_free
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_get_blk
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_put_blk
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_mark_blk
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_submit_io
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_erase_blk
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_addr_to_generic_mode
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_generic_to_addr_mode
Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_free_rqd_ppalist
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_end_io
Cyclomatic Complexity 5 drivers/lightnvm/core.c:nvm_bb_tbl_fold
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_get_bb_tbl
Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_free_mgr
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_alloc_dev
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_find_mgr_type
Cyclomatic Complexity 5 drivers/lightnvm/core.c:nvm_find_target_type
Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_register_tgt_type
Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_unregister_tgt_type
Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_unregister_mgr
Cyclomatic Complexity 3 include/linux/err.h:IS_ERR_OR_NULL
Cyclomatic Complexity 8 drivers/lightnvm/core.c:nvm_init_mgr
Cyclomatic Complexity 4 drivers/lightnvm/core.c:nvm_register_mgr
Cyclomatic Complexity 9 drivers/lightnvm/core.c:nvm_set_rqd_ppalist
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_erase_ppa
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_end_io_sync
Cyclomatic Complexity 1 include/linux/completion.h:init_completion
Cyclomatic Complexity 5 drivers/lightnvm/core.c:__nvm_submit_ppa
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_submit_ppa_list
Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_submit_ppa
Cyclomatic Complexity 5 include/linux/slab.h:kmalloc_array
Cyclomatic Complexity 1 include/linux/slab.h:kcalloc
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_init_slc_tbl
Cyclomatic Complexity 5 drivers/lightnvm/core.c:nvm_init_mlc_tbl
Cyclomatic Complexity 9 drivers/lightnvm/core.c:nvm_core_init
Cyclomatic Complexity 7 drivers/lightnvm/core.c:nvm_init
Cyclomatic Complexity 10 drivers/lightnvm/core.c:nvm_register
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_exit
Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_unregister
Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_free
cc1: some warnings being treated as errors
vim +1169 drivers/lightnvm/core.c
1157 .open = nonseekable_open,
1158 .unlocked_ioctl = nvm_ctl_ioctl,
1159 .owner = THIS_MODULE,
1160 .llseek = noop_llseek,
1161 };
1162
> 1163 static struct miscdevice _nvm_misc = {
1164 .minor = MISC_DYNAMIC_MINOR,
1165 .name = "lightnvm",
1166 .nodename = "lightnvm/control",
1167 .fops = &_ctl_fops,
1168 };
> 1169 builtin_misc_device(_nvm_misc);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[Re: [PATCH 1/3] lightnvm: make core.c explicitly non-modular] On 30/10/2016 (Sun 06:01) kbuild test robot wrote:
> Hi Paul,
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.9-rc3 next-20161028]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
As per the 0/3 mail, these commits are specific to Greg's char-misc
tree, and it was known they would fail on current "master".
> [Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
Does the above apply to _any_ tree on kernel.org? Or just commits
merged into mainline already? Since the base here is only in Greg's
repo and maybe also in some linux-next trees.
Thanks,
Paul.
--
> [Check https://git-scm.com/docs/git-format-patch for more information]
>
> url: https://github.com/0day-ci/linux/commits/Paul-Gortmaker/lightnvm-make-core-c-explicitly-non-modular/20161030-044459
> config: i386-randconfig-x073-201644 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All error/warnings (new ones prefixed by >>):
>
> >> drivers/lightnvm/core.c:1169:1: warning: data definition has no type or storage class
> builtin_misc_device(_nvm_misc);
> ^~~~~~~~~~~~~~~~~~~
> >> drivers/lightnvm/core.c:1169:1: error: type defaults to 'int' in declaration of 'builtin_misc_device' [-Werror=implicit-int]
> >> drivers/lightnvm/core.c:1169:1: warning: parameter names (without types) in function declaration
> >> drivers/lightnvm/core.c:1163:26: warning: '_nvm_misc' defined but not used [-Wunused-variable]
> static struct miscdevice _nvm_misc = {
> ^~~~~~~~~
> Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
> Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
> Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
> Cyclomatic Complexity 1 include/linux/list.h:__list_add
> Cyclomatic Complexity 1 include/linux/list.h:list_add
> Cyclomatic Complexity 1 include/linux/list.h:__list_del
> Cyclomatic Complexity 1 include/linux/list.h:list_del
> Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
> Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
> Cyclomatic Complexity 1 include/linux/slab.h:__kmalloc_node
> Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
> Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
> Cyclomatic Complexity 3 include/linux/slab.h:kmalloc
> Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_node
> Cyclomatic Complexity 1 include/linux/slab.h:kzalloc_node
> Cyclomatic Complexity 1 include/linux/lightnvm.h:generic_to_dev_addr
> Cyclomatic Complexity 1 include/linux/lightnvm.h:dev_to_generic_addr
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_dev_dma_alloc
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_dev_dma_free
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_get_blk
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_put_blk
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_mark_blk
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_submit_io
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_erase_blk
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_addr_to_generic_mode
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_generic_to_addr_mode
> Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_free_rqd_ppalist
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_end_io
> Cyclomatic Complexity 5 drivers/lightnvm/core.c:nvm_bb_tbl_fold
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_get_bb_tbl
> Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_free_mgr
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_alloc_dev
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_find_mgr_type
> Cyclomatic Complexity 5 drivers/lightnvm/core.c:nvm_find_target_type
> Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_register_tgt_type
> Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_unregister_tgt_type
> Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_unregister_mgr
> Cyclomatic Complexity 3 include/linux/err.h:IS_ERR_OR_NULL
> Cyclomatic Complexity 8 drivers/lightnvm/core.c:nvm_init_mgr
> Cyclomatic Complexity 4 drivers/lightnvm/core.c:nvm_register_mgr
> Cyclomatic Complexity 9 drivers/lightnvm/core.c:nvm_set_rqd_ppalist
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_erase_ppa
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_end_io_sync
> Cyclomatic Complexity 1 include/linux/completion.h:init_completion
> Cyclomatic Complexity 5 drivers/lightnvm/core.c:__nvm_submit_ppa
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_submit_ppa_list
> Cyclomatic Complexity 2 drivers/lightnvm/core.c:nvm_submit_ppa
> Cyclomatic Complexity 5 include/linux/slab.h:kmalloc_array
> Cyclomatic Complexity 1 include/linux/slab.h:kcalloc
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_init_slc_tbl
> Cyclomatic Complexity 5 drivers/lightnvm/core.c:nvm_init_mlc_tbl
> Cyclomatic Complexity 9 drivers/lightnvm/core.c:nvm_core_init
> Cyclomatic Complexity 7 drivers/lightnvm/core.c:nvm_init
> Cyclomatic Complexity 10 drivers/lightnvm/core.c:nvm_register
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_exit
> Cyclomatic Complexity 1 drivers/lightnvm/core.c:nvm_unregister
> Cyclomatic Complexity 3 drivers/lightnvm/core.c:nvm_free
> cc1: some warnings being treated as errors
>
> vim +1169 drivers/lightnvm/core.c
>
> 1157 .open = nonseekable_open,
> 1158 .unlocked_ioctl = nvm_ctl_ioctl,
> 1159 .owner = THIS_MODULE,
> 1160 .llseek = noop_llseek,
> 1161 };
> 1162
> > 1163 static struct miscdevice _nvm_misc = {
> 1164 .minor = MISC_DYNAMIC_MINOR,
> 1165 .name = "lightnvm",
> 1166 .nodename = "lightnvm/control",
> 1167 .fops = &_ctl_fops,
> 1168 };
> > 1169 builtin_misc_device(_nvm_misc);
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Paul,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc3 next-20161028]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Paul-Gortmaker/lightnvm-make-core-c-explicitly-non-modular/20161030-044459
config: s390-default_defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390
All error/warnings (new ones prefixed by >>):
>> drivers/s390/char/sclp_ctl.c:129:1: warning: data definition has no type or storage class
builtin_misc_device(sclp_ctl_device);
^~~~~~~~~~~~~~~~~~~
>> drivers/s390/char/sclp_ctl.c:129:1: error: type defaults to 'int' in declaration of 'builtin_misc_device' [-Werror=implicit-int]
>> drivers/s390/char/sclp_ctl.c:129:1: warning: parameter names (without types) in function declaration
>> drivers/s390/char/sclp_ctl.c:124:26: warning: 'sclp_ctl_device' defined but not used [-Wunused-variable]
static struct miscdevice sclp_ctl_device = {
^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +129 drivers/s390/char/sclp_ctl.c
118 .llseek = no_llseek,
119 };
120
121 /*
122 * Misc device definition
123 */
> 124 static struct miscdevice sclp_ctl_device = {
125 .minor = MISC_DYNAMIC_MINOR,
126 .name = "sclp",
127 .fops = &sclp_ctl_fops,
128 };
> 129 builtin_misc_device(sclp_ctl_device);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Paul,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc3 next-20161028]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Paul-Gortmaker/lightnvm-make-core-c-explicitly-non-modular/20161030-044459
config: blackfin-CM-BF561_defconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All error/warnings (new ones prefixed by >>):
>> arch/blackfin/mach-bf561/coreb.c:64:1: warning: data definition has no type or storage class
builtin_misc_device(coreb_dev);
^~~~~~~~~~~~~~~~~~~
>> arch/blackfin/mach-bf561/coreb.c:64:1: error: type defaults to 'int' in declaration of 'builtin_misc_device' [-Werror=implicit-int]
>> arch/blackfin/mach-bf561/coreb.c:64:1: warning: parameter names (without types) in function declaration
>> arch/blackfin/mach-bf561/coreb.c:59:26: warning: 'coreb_dev' defined but not used [-Wunused-variable]
static struct miscdevice coreb_dev = {
^~~~~~~~~
cc1: some warnings being treated as errors
vim +64 arch/blackfin/mach-bf561/coreb.c
53 static const struct file_operations coreb_fops = {
54 .owner = THIS_MODULE,
55 .unlocked_ioctl = coreb_ioctl,
56 .llseek = noop_llseek,
57 };
58
> 59 static struct miscdevice coreb_dev = {
60 .minor = MISC_DYNAMIC_MINOR,
61 .name = "coreb",
62 .fops = &coreb_fops,
63 };
> 64 builtin_misc_device(coreb_dev);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
On Sat, 29 Oct 2016 16:38:43 -0400
Paul Gortmaker <[email protected]> wrote:
> The Makefile currently controlling compilation of this code is obj-y,
> meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modular usage, so that when reading
> the driver there is no doubt it is builtin-only.
>
> Since module_misc_device translates to device_initcall in the non-modular
> case, the init ordering remains unchanged with this commit.
>
> Cc: Martin Schwidefsky <[email protected]>
> Cc: Heiko Carstens <[email protected]>
> Cc: Paul Gortmaker <[email protected]>
> Cc: Michael Holzheu <[email protected]>
> Cc: [email protected]
> Signed-off-by: Paul Gortmaker <[email protected]>
That idea behind the patch makes sense to me. But the built robot
reports a new warning which should be fixed. If that is done:
Acked-by: Martin Schwidefsky <[email protected]>
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
[Re: [PATCH 3/3] s390: char: make slp_ctl explicitly non-modular] On 30/10/2016 (Sun 14:43) Martin Schwidefsky wrote:
[...]
> That idea behind the patch makes sense to me. But the built robot
> reports a new warning which should be fixed. If that is done:
>
> Acked-by: Martin Schwidefsky <[email protected]>
The kbuild robot is a false positive ; it test-applied the patches on
master and not on Greg's char-misc ; which as per the 0/3 text is the
whole reason we are putting these patches in via Greg's branch. So
there should be nothing to fix once they are in the right place.
Paul.
--
>
> --
> blue skies,
> Martin.
>
> "Reality continues to ruin my life." - Calvin.
>