public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [jfern:sched/scx-dlserver-boost 16/16] kernel/sched/deadline.c:1765:5: warning: no previous prototype for function 'dl_server_remove_params'
@ 2025-03-28  6:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-03-28  6:15 UTC (permalink / raw)
  To: Joel Fernandes; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git sched/scx-dlserver-boost
head:   153b74fef19625181700e52ed4017330372a961e
commit: 153b74fef19625181700e52ed4017330372a961e [16/16] Add a function to remove the dl_server's bw reservation
config: riscv-randconfig-002-20250328 (https://download.01.org/0day-ci/archive/20250328/202503281421.a2nhfsTA-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project c2692afc0a92cd5da140dfcdfff7818a5b8ce997)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250328/202503281421.a2nhfsTA-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/202503281421.a2nhfsTA-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/build_policy.c:60:
>> kernel/sched/deadline.c:1765:5: warning: no previous prototype for function 'dl_server_remove_params' [-Wmissing-prototypes]
    1765 | int dl_server_remove_params(struct sched_dl_entity *dl_se)
         |     ^
   kernel/sched/deadline.c:1765:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1765 | int dl_server_remove_params(struct sched_dl_entity *dl_se)
         | ^
         | static 
   1 warning generated.


vim +/dl_server_remove_params +1765 kernel/sched/deadline.c

  1755	
  1756	/**
  1757	 * dl_server_remove_params - Remove bandwidth reservation for a DL server
  1758	 * @dl_se: The DL server entity to remove bandwidth for
  1759	 *
  1760	 * This function removes the bandwidth reservation for a DL server entity,
  1761	 * cleaning up all bandwidth accounting and server state.
  1762	 *
  1763	 * Returns: 0 on success, negative error code on failure
  1764	 */
> 1765	int dl_server_remove_params(struct sched_dl_entity *dl_se)
  1766	{
  1767	    struct rq *rq = dl_se->rq;
  1768	    int cpu = cpu_of(rq);
  1769	    struct dl_bw *dl_b;
  1770	    int cpus;
  1771	
  1772	    if (!dl_se->dl_runtime)
  1773	        return 0;  /* Already disabled */
  1774	
  1775	    /*
  1776		 * First dequeue if still queued. It should not be queued since
  1777		 * we call this only after the last dl_server_stop().
  1778		 */
  1779	    if (WARN_ON_ONCE(on_dl_rq(dl_se)))
  1780	        dequeue_dl_entity(dl_se, DEQUEUE_SLEEP);
  1781	
  1782	    /* Cancel any pending timers */
  1783	    hrtimer_try_to_cancel(&dl_se->dl_timer);
  1784	    hrtimer_try_to_cancel(&dl_se->inactive_timer);
  1785	
  1786	    
  1787		/* Remove bandwidth from both runqueue and root domain accounting */
  1788	    dl_b = dl_bw_of(cpu);
  1789	    guard(raw_spinlock)(&dl_b->lock);
  1790	    cpus = dl_bw_cpus(cpu);
  1791	
  1792	    sub_rq_bw(dl_se, &rq->dl);
  1793	    __dl_sub(dl_b, dl_se->dl_bw, cpus);
  1794	
  1795	    /*
  1796	     * If server was active and consuming bandwidth, remove it from
  1797	     * running bandwidth accounting. This should not happen because
  1798	     * we call this only after the last dl_server_stop().
  1799	     */
  1800	    if (WARN_ON_ONCE(!dl_se->dl_non_contending))
  1801	        sub_running_bw(dl_se, &rq->dl);
  1802	
  1803	    /*
  1804		 * Clear all server parameters. This will also clear ->dl_server so
  1805		 * the next dl_server_apply_params() will reconfigure the server.
  1806		 */
  1807	    __dl_clear_params(dl_se);
  1808	
  1809	    return 0;
  1810	}
  1811	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-28  6:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28  6:15 [jfern:sched/scx-dlserver-boost 16/16] kernel/sched/deadline.c:1765:5: warning: no previous prototype for function 'dl_server_remove_params' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox