All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 8690/11173] drivers/clocksource/timer-sp804.c:68:12: warning: no previous prototype for function 'sp804_clocksource_and_sched_clock_init'
Date: Sat, 26 Sep 2020 10:51:39 +0800	[thread overview]
Message-ID: <202009261037.OYybN2j9%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6376 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   20dc779fdefc40bf7dd9736cea01704f29228fae
commit: a3ed934843af074bfde722b8a8574b3eb4f08480 [8690/11173] clocksource: sp804: delete the leading "__" of some functions
config: arm64-randconfig-r035-20200923 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d6ac649ccda289ecc2d2c0cb51892d57e8ec328c)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a3ed934843af074bfde722b8a8574b3eb4f08480
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout a3ed934843af074bfde722b8a8574b3eb4f08480
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/clocksource/timer-sp804.c:68:12: warning: no previous prototype for function 'sp804_clocksource_and_sched_clock_init' [-Wmissing-prototypes]
   int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
              ^
   drivers/clocksource/timer-sp804.c:68:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
   ^
   static 
>> drivers/clocksource/timer-sp804.c:162:12: warning: no previous prototype for function 'sp804_clockevents_init' [-Wmissing-prototypes]
   int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
              ^
   drivers/clocksource/timer-sp804.c:162:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
   ^
   static 
   2 warnings generated.

vim +/sp804_clocksource_and_sched_clock_init +68 drivers/clocksource/timer-sp804.c

    67	
  > 68	int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
    69							  const char *name,
    70							  struct clk *clk,
    71							  int use_sched_clock)
    72	{
    73		long rate;
    74	
    75		rate = sp804_get_clock_rate(clk, name);
    76		if (rate < 0)
    77			return -EINVAL;
    78	
    79		/* setup timer 0 as free-running clocksource */
    80		writel(0, base + TIMER_CTRL);
    81		writel(0xffffffff, base + TIMER_LOAD);
    82		writel(0xffffffff, base + TIMER_VALUE);
    83		writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
    84			base + TIMER_CTRL);
    85	
    86		clocksource_mmio_init(base + TIMER_VALUE, name,
    87			rate, 200, 32, clocksource_mmio_readl_down);
    88	
    89		if (use_sched_clock) {
    90			sched_clock_base = base;
    91			sched_clock_register(sp804_read, 32, rate);
    92		}
    93	
    94		return 0;
    95	}
    96	
    97	
    98	static void __iomem *clkevt_base;
    99	static unsigned long clkevt_reload;
   100	
   101	/*
   102	 * IRQ handler for the timer
   103	 */
   104	static irqreturn_t sp804_timer_interrupt(int irq, void *dev_id)
   105	{
   106		struct clock_event_device *evt = dev_id;
   107	
   108		/* clear the interrupt */
   109		writel(1, clkevt_base + TIMER_INTCLR);
   110	
   111		evt->event_handler(evt);
   112	
   113		return IRQ_HANDLED;
   114	}
   115	
   116	static inline void timer_shutdown(struct clock_event_device *evt)
   117	{
   118		writel(0, clkevt_base + TIMER_CTRL);
   119	}
   120	
   121	static int sp804_shutdown(struct clock_event_device *evt)
   122	{
   123		timer_shutdown(evt);
   124		return 0;
   125	}
   126	
   127	static int sp804_set_periodic(struct clock_event_device *evt)
   128	{
   129		unsigned long ctrl = TIMER_CTRL_32BIT | TIMER_CTRL_IE |
   130				     TIMER_CTRL_PERIODIC | TIMER_CTRL_ENABLE;
   131	
   132		timer_shutdown(evt);
   133		writel(clkevt_reload, clkevt_base + TIMER_LOAD);
   134		writel(ctrl, clkevt_base + TIMER_CTRL);
   135		return 0;
   136	}
   137	
   138	static int sp804_set_next_event(unsigned long next,
   139		struct clock_event_device *evt)
   140	{
   141		unsigned long ctrl = TIMER_CTRL_32BIT | TIMER_CTRL_IE |
   142				     TIMER_CTRL_ONESHOT | TIMER_CTRL_ENABLE;
   143	
   144		writel(next, clkevt_base + TIMER_LOAD);
   145		writel(ctrl, clkevt_base + TIMER_CTRL);
   146	
   147		return 0;
   148	}
   149	
   150	static struct clock_event_device sp804_clockevent = {
   151		.features		= CLOCK_EVT_FEAT_PERIODIC |
   152					  CLOCK_EVT_FEAT_ONESHOT |
   153					  CLOCK_EVT_FEAT_DYNIRQ,
   154		.set_state_shutdown	= sp804_shutdown,
   155		.set_state_periodic	= sp804_set_periodic,
   156		.set_state_oneshot	= sp804_shutdown,
   157		.tick_resume		= sp804_shutdown,
   158		.set_next_event		= sp804_set_next_event,
   159		.rating			= 300,
   160	};
   161	
 > 162	int __init sp804_clockevents_init(void __iomem *base, unsigned int irq,
   163					  struct clk *clk, const char *name)
   164	{
   165		struct clock_event_device *evt = &sp804_clockevent;
   166		long rate;
   167	
   168		rate = sp804_get_clock_rate(clk, name);
   169		if (rate < 0)
   170			return -EINVAL;
   171	
   172		clkevt_base = base;
   173		clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ);
   174		evt->name = name;
   175		evt->irq = irq;
   176		evt->cpumask = cpu_possible_mask;
   177	
   178		writel(0, base + TIMER_CTRL);
   179	
   180		if (request_irq(irq, sp804_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
   181				"timer", &sp804_clockevent))
   182			pr_err("%s: request_irq() failed\n", "timer");
   183		clockevents_config_and_register(evt, rate, 0xf, 0xffffffff);
   184	
   185		return 0;
   186	}
   187	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 49674 bytes --]

             reply	other threads:[~2020-09-26  2:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26  2:51 kernel test robot [this message]
2020-09-27  7:51 ` [linux-next:master 8690/11173] drivers/clocksource/timer-sp804.c:68:12: warning: no previous prototype for function 'sp804_clocksource_and_sched_clock_init' Leizhen
2020-09-27  9:30   ` Leizhen

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=202009261037.OYybN2j9%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.