All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Brian Masney <bmasney@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [linux-next:master 6189/12740] drivers/clk/microchip/clk-core.c:391:12: error: redefinition of 'roclk_determine_rate'
Date: Sun, 28 Sep 2025 03:48:14 +0800	[thread overview]
Message-ID: <202509280327.jsapR0Ww-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   262858079afde6d367ce3db183c74d8a43a0e83f
commit: e9f039c08cdc9b38665aee9a88ae21f59c09ba8c [6189/12740] clk: microchip: core: convert from round_rate() to determine_rate()
config: mips-randconfig-r131-20250927 (https://download.01.org/0day-ci/archive/20250928/202509280327.jsapR0Ww-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project cafc064fc7a96b3979a023ddae1da2b499d6c954)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250928/202509280327.jsapR0Ww-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509280327.jsapR0Ww-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/clk/microchip/clk-core.c:391:12: error: redefinition of 'roclk_determine_rate'
     391 | static int roclk_determine_rate(struct clk_hw *hw,
         |            ^
   drivers/clk/microchip/clk-core.c:377:12: note: previous definition is here
     377 | static int roclk_determine_rate(struct clk_hw *hw,
         |            ^
>> drivers/clk/microchip/clk-core.c:411:18: error: call to undeclared function 'roclk_round_rate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     411 |                 nearest_rate = roclk_round_rate(hw, req->rate, &parent_rate);
         |                                ^
   drivers/clk/microchip/clk-core.c:926:20: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
     926 |         .determine_rate = __clk_mux_determine_rate,
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/microchip/clk-core.c:922:20: note: previous initialization is here
     922 |         .determine_rate = sclk_determine_rate,
         |                           ^~~~~~~~~~~~~~~~~~~
   1 warning and 2 errors generated.


vim +/roclk_determine_rate +391 drivers/clk/microchip/clk-core.c

ce6e1188465998 Purna Chandra Mandal 2016-05-13  390  
ce6e1188465998 Purna Chandra Mandal 2016-05-13 @391  static int roclk_determine_rate(struct clk_hw *hw,
ce6e1188465998 Purna Chandra Mandal 2016-05-13  392  				struct clk_rate_request *req)
ce6e1188465998 Purna Chandra Mandal 2016-05-13  393  {
ce6e1188465998 Purna Chandra Mandal 2016-05-13  394  	struct clk_hw *parent_clk, *best_parent_clk = NULL;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  395  	unsigned int i, delta, best_delta = -1;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  396  	unsigned long parent_rate, best_parent_rate = 0;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  397  	unsigned long best = 0, nearest_rate;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  398  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  399  	/* find a parent which can generate nearest clkrate >= rate */
ce6e1188465998 Purna Chandra Mandal 2016-05-13  400  	for (i = 0; i < clk_hw_get_num_parents(hw); i++) {
ce6e1188465998 Purna Chandra Mandal 2016-05-13  401  		/* get parent */
ce6e1188465998 Purna Chandra Mandal 2016-05-13  402  		parent_clk = clk_hw_get_parent_by_index(hw, i);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  403  		if (!parent_clk)
ce6e1188465998 Purna Chandra Mandal 2016-05-13  404  			continue;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  405  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  406  		/* skip if parent runs slower than target rate */
ce6e1188465998 Purna Chandra Mandal 2016-05-13  407  		parent_rate = clk_hw_get_rate(parent_clk);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  408  		if (req->rate > parent_rate)
ce6e1188465998 Purna Chandra Mandal 2016-05-13  409  			continue;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  410  
ce6e1188465998 Purna Chandra Mandal 2016-05-13 @411  		nearest_rate = roclk_round_rate(hw, req->rate, &parent_rate);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  412  		delta = abs(nearest_rate - req->rate);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  413  		if ((nearest_rate >= req->rate) && (delta < best_delta)) {
ce6e1188465998 Purna Chandra Mandal 2016-05-13  414  			best_parent_clk = parent_clk;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  415  			best_parent_rate = parent_rate;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  416  			best = nearest_rate;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  417  			best_delta = delta;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  418  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  419  			if (delta == 0)
ce6e1188465998 Purna Chandra Mandal 2016-05-13  420  				break;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  421  		}
ce6e1188465998 Purna Chandra Mandal 2016-05-13  422  	}
ce6e1188465998 Purna Chandra Mandal 2016-05-13  423  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  424  	/* if no match found, retain old rate */
ce6e1188465998 Purna Chandra Mandal 2016-05-13  425  	if (!best_parent_clk) {
ce6e1188465998 Purna Chandra Mandal 2016-05-13  426  		pr_err("%s:%s, no parent found for rate %lu.\n",
ce6e1188465998 Purna Chandra Mandal 2016-05-13  427  		       __func__, clk_hw_get_name(hw), req->rate);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  428  		return clk_hw_get_rate(hw);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  429  	}
ce6e1188465998 Purna Chandra Mandal 2016-05-13  430  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  431  	pr_debug("%s,rate %lu, best_parent(%s, %lu), best %lu, delta %d\n",
ce6e1188465998 Purna Chandra Mandal 2016-05-13  432  		 clk_hw_get_name(hw), req->rate,
ce6e1188465998 Purna Chandra Mandal 2016-05-13  433  		 clk_hw_get_name(best_parent_clk), best_parent_rate,
ce6e1188465998 Purna Chandra Mandal 2016-05-13  434  		 best, best_delta);
ce6e1188465998 Purna Chandra Mandal 2016-05-13  435  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  436  	if (req->best_parent_rate)
ce6e1188465998 Purna Chandra Mandal 2016-05-13  437  		req->best_parent_rate = best_parent_rate;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  438  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  439  	if (req->best_parent_hw)
ce6e1188465998 Purna Chandra Mandal 2016-05-13  440  		req->best_parent_hw = best_parent_clk;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  441  
ce6e1188465998 Purna Chandra Mandal 2016-05-13  442  	return best;
ce6e1188465998 Purna Chandra Mandal 2016-05-13  443  }
ce6e1188465998 Purna Chandra Mandal 2016-05-13  444  

:::::: The code at line 391 was first introduced by commit
:::::: ce6e1188465998820e7182455261b1f5d508ca17 CLK: microchip: Add Microchip PIC32 clock driver.

:::::: TO: Purna Chandra Mandal <purna.mandal@microchip.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-09-27 19:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-27 19:48 kernel test robot [this message]
2025-09-28  0:36 ` [linux-next:master 6189/12740] drivers/clk/microchip/clk-core.c:391:12: error: redefinition of 'roclk_determine_rate' Brian Masney

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=202509280327.jsapR0Ww-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bmasney@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.