* [PATCH 4/4] sh: remove board_time_init() callback [not found] <20180420154933.3235131-1-arnd@arndb.de> @ 2018-04-20 15:48 ` Arnd Bergmann 2018-04-20 21:51 ` Arnd Bergmann 2018-04-22 6:30 ` kbuild test robot 0 siblings, 2 replies; 4+ messages in thread From: Arnd Bergmann @ 2018-04-20 15:48 UTC (permalink / raw) To: Rich Felker Cc: Baolin Wang, Yoshinori Sato, linux-sh, broonie, Arnd Bergmann, Jonathan Corbet, linux-doc, linux-kernel The only remaining user of board_time_init() is the of-generic machine, and that just calls the global timer_init() function. Calling that one has no effect on non-DT platforms, so we can simply call it unconditionally in place of board_time_init(). Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- Documentation/sh/new-machine.txt | 8 -------- arch/sh/boards/of-generic.c | 8 -------- arch/sh/include/asm/rtc.h | 1 - arch/sh/kernel/time.c | 5 +---- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/Documentation/sh/new-machine.txt b/Documentation/sh/new-machine.txt index f0354164cb0e..e0961a66130b 100644 --- a/Documentation/sh/new-machine.txt +++ b/Documentation/sh/new-machine.txt @@ -116,7 +116,6 @@ might look something like: * arch/sh/boards/vapor/setup.c - Setup code for imaginary board */ #include <linux/init.h> -#include <asm/rtc.h> /* for board_time_init() */ const char *get_system_type(void) { @@ -132,13 +131,6 @@ int __init platform_setup(void) * this board. */ - /* - * Presume all FooTech boards have the same broken timer, - * and also presume that we've defined foo_timer_init to - * do something useful. - */ - board_time_init = foo_timer_init; - /* Start-up imaginary PCI ... */ /* And whatever else ... */ diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index 46b2481eec90..ee74ff1e7721 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -116,18 +116,10 @@ static void __init sh_of_mem_reserve(void) early_init_fdt_scan_reserved_mem(); } -static void __init sh_of_time_init(void) -{ - pr_info("SH generic board support: scanning for clocksource devices\n"); - timer_probe(); -} - static void __init sh_of_setup(char **cmdline_p) { struct device_node *root; - board_time_init = sh_of_time_init; - sh_mv.mv_name = "Unknown SH model"; root = of_find_node_by_path("/"); if (root) { diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h index fe55fbb181aa..69dbae2949b0 100644 --- a/arch/sh/include/asm/rtc.h +++ b/arch/sh/include/asm/rtc.h @@ -3,7 +3,6 @@ #define _ASM_RTC_H void time_init(void); -extern void (*board_time_init)(void); #define RTC_CAP_4_DIGIT_YEAR (1 << 0) diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index eb0a91270499..a29eb989d81b 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -22,8 +22,6 @@ #include <asm/clock.h> #include <asm/rtc.h> -void (*board_time_init)(void); - static void __init sh_late_time_init(void) { /* @@ -41,8 +39,7 @@ static void __init sh_late_time_init(void) void __init time_init(void) { - if (board_time_init) - board_time_init(); + timer_init(); clk_init(); -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 4/4] sh: remove board_time_init() callback 2018-04-20 15:48 ` [PATCH 4/4] sh: remove board_time_init() callback Arnd Bergmann @ 2018-04-20 21:51 ` Arnd Bergmann 2018-04-20 21:57 ` Rich Felker 2018-04-22 6:30 ` kbuild test robot 1 sibling, 1 reply; 4+ messages in thread From: Arnd Bergmann @ 2018-04-20 21:51 UTC (permalink / raw) To: Rich Felker Cc: Baolin Wang, Yoshinori Sato, Linux-sh list, Mark Brown, Arnd Bergmann, Jonathan Corbet, open list:DOCUMENTATION, Linux Kernel Mailing List On Fri, Apr 20, 2018 at 5:48 PM, Arnd Bergmann <arnd@arndb.de> wrote: > @@ -41,8 +39,7 @@ static void __init sh_late_time_init(void) > > void __init time_init(void) > { > - if (board_time_init) > - board_time_init(); > + timer_init(); Testing revealed this to be broken, the fix is: diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index a29eb989d81b..8a1c6c8ab4ec 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -39,7 +39,7 @@ static void __init sh_late_time_init(void) void __init time_init(void) { - timer_init(); + timer_probe(); clk_init(); Let me know if you'd like me to resend the series with that typo fixed. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 4/4] sh: remove board_time_init() callback 2018-04-20 21:51 ` Arnd Bergmann @ 2018-04-20 21:57 ` Rich Felker 0 siblings, 0 replies; 4+ messages in thread From: Rich Felker @ 2018-04-20 21:57 UTC (permalink / raw) To: Arnd Bergmann Cc: Baolin Wang, Yoshinori Sato, Linux-sh list, Mark Brown, Jonathan Corbet, open list:DOCUMENTATION, Linux Kernel Mailing List On Fri, Apr 20, 2018 at 11:51:18PM +0200, Arnd Bergmann wrote: > On Fri, Apr 20, 2018 at 5:48 PM, Arnd Bergmann <arnd@arndb.de> wrote: > > > @@ -41,8 +39,7 @@ static void __init sh_late_time_init(void) > > > > void __init time_init(void) > > { > > - if (board_time_init) > > - board_time_init(); > > + timer_init(); > > Testing revealed this to be broken, the fix is: > > diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c > index a29eb989d81b..8a1c6c8ab4ec 100644 > --- a/arch/sh/kernel/time.c > +++ b/arch/sh/kernel/time.c > @@ -39,7 +39,7 @@ static void __init sh_late_time_init(void) > > void __init time_init(void) > { > - timer_init(); > + timer_probe(); > > clk_init(); > > Let me know if you'd like me to resend the series with that typo fixed. If there are no other issues to correct, I can fix this when merging. Rich -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4/4] sh: remove board_time_init() callback 2018-04-20 15:48 ` [PATCH 4/4] sh: remove board_time_init() callback Arnd Bergmann 2018-04-20 21:51 ` Arnd Bergmann @ 2018-04-22 6:30 ` kbuild test robot 1 sibling, 0 replies; 4+ messages in thread From: kbuild test robot @ 2018-04-22 6:30 UTC (permalink / raw) To: Arnd Bergmann Cc: kbuild-all, Rich Felker, Baolin Wang, Yoshinori Sato, linux-sh, broonie, Arnd Bergmann, Jonathan Corbet, linux-doc, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1316 bytes --] Hi Arnd, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc1 next-20180420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/sh-dreamcast-rtc-push-down-rtc-class-ops-into-driver/20180421-071330 config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sh All errors (new ones prefixed by >>): arch/sh/kernel/time.c: In function 'time_init': >> arch/sh/kernel/time.c:42:2: error: implicit declaration of function 'timer_init'; did you mean 'time_init'? [-Werror=implicit-function-declaration] timer_init(); ^~~~~~~~~~ time_init cc1: all warnings being treated as errors vim +42 arch/sh/kernel/time.c 39 40 void __init time_init(void) 41 { > 42 timer_init(); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 47757 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-22 6:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180420154933.3235131-1-arnd@arndb.de>
2018-04-20 15:48 ` [PATCH 4/4] sh: remove board_time_init() callback Arnd Bergmann
2018-04-20 21:51 ` Arnd Bergmann
2018-04-20 21:57 ` Rich Felker
2018-04-22 6:30 ` kbuild test robot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox