diff options
author | Stafford Horne <shorne@gmail.com> | 2021-08-05 04:49:36 +0200 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2021-08-10 23:14:23 +0200 |
commit | 94effcedaa543825ad9c80831450d4fbfa284880 (patch) | |
tree | cf6db2706881fdb821b128bfe9d4cc089dfd2faa /arch/openrisc/kernel/setup.c | |
parent | openrisc: rename or32 code & comments to or1k (diff) | |
download | linux-94effcedaa543825ad9c80831450d4fbfa284880.tar.xz linux-94effcedaa543825ad9c80831450d4fbfa284880.zip |
openrisc: Fix compiler warnings in setup
This was pointed out with the recent name change of or32_early_setup to
or1k_early_setup. Investigating the file I found a few other warnings
so cleaning them up here.
arch/openrisc/kernel/setup.c:220:13: warning: no previous prototype for 'or1k_early_setup' [-Wmissing-prototypes]
220 | void __init or1k_early_setup(void *fdt)
| ^~~~~~~~~~~~~~~~
Fix this the missing or1k_early_setup prototype warning by adding an
asm/setup.h file to define the prototype.
arch/openrisc/kernel/setup.c:246:13: warning: no previous prototype for 'detect_unit_config' [-Wmissing-prototypes]
246 | void __init detect_unit_config(unsigned long upr, unsigned long mask,
| ^~~~~~~~~~~~~~~~~~
The function detect_unit_config is not used, just remove it.
arch/openrisc/kernel/setup.c:221: warning: Function parameter or member 'fdt' not described in 'or1k_early_setup'
Add @fdt docs to the function comment to suppress this warning.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Diffstat (limited to 'arch/openrisc/kernel/setup.c')
-rw-r--r-- | arch/openrisc/kernel/setup.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c index 7eddcac0ef2f..0cd04d936a7a 100644 --- a/arch/openrisc/kernel/setup.c +++ b/arch/openrisc/kernel/setup.c @@ -210,6 +210,7 @@ void __init setup_cpuinfo(void) /** * or1k_early_setup + * @fdt: pointer to the start of the device tree in memory or NULL * * Handles the pointer to the device tree that this kernel is to use * for establishing the available platform devices. @@ -243,21 +244,6 @@ static inline unsigned long extract_value(unsigned long reg, unsigned long mask) return mask & reg; } -void __init detect_unit_config(unsigned long upr, unsigned long mask, - char *text, void (*func) (void)) -{ - if (text != NULL) - printk("%s", text); - - if (upr & mask) { - if (func != NULL) - func(); - else - printk("present\n"); - } else - printk("not present\n"); -} - /* * calibrate_delay * |