lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204260827.tAcRW0sh-lkp@intel.com>
Date:   Tue, 26 Apr 2022 08:21:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Hector Martin <marcan@...can.st>
Subject: [asahilinux:pr/22 78/189] kernel/reboot.c:527: warning: expecting
 prototype for devm_register_sys_off_handler(). Prototype was for
 register_sys_off_handler() instead

tree:   https://github.com/AsahiLinux/linux pr/22
head:   7ee315306d1a3b0da8cf2a53e7f55889d0e7f034
commit: ec159207530d80c0a0bd04c1ac94db5766bbc3c0 [78/189] kernel: Add combined power-off+restart handler call chain API
config: arc-randconfig-r043-20220425 (https://download.01.org/0day-ci/archive/20220426/202204260827.tAcRW0sh-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
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
        # https://github.com/AsahiLinux/linux/commit/ec159207530d80c0a0bd04c1ac94db5766bbc3c0
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux pr/22
        git checkout ec159207530d80c0a0bd04c1ac94db5766bbc3c0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   kernel/reboot.c:231: warning: Function parameter or member 'cmd' not described in 'do_kernel_restart'
>> kernel/reboot.c:527: warning: expecting prototype for devm_register_sys_off_handler(). Prototype was for register_sys_off_handler() instead
   kernel/reboot.c:1151: warning: Function parameter or member 'poweroff_delay_ms' not described in 'hw_failure_emergency_poweroff'


vim +527 kernel/reboot.c

   515	
   516	/**
   517	 *	devm_register_sys_off_handler - Register system power-off/restart handler
   518	 *	@dev: Device that registers handler
   519	 *	@handler: System-off handler
   520	 *
   521	 *	Registers handler that will be called as last step of the power-off
   522	 *	and restart sequences.
   523	 *
   524	 *	Returns zero on success, or error code on failure.
   525	 */
   526	int register_sys_off_handler(struct sys_off_handler *handler)
 > 527	{
   528		struct sys_off_handler_private_data *priv;
   529		int err, priority;
   530	
   531		priv = sys_off_handler_private_data(handler);
   532	
   533		/* sanity-check whether handler is registered twice */
   534		if (priv->registered)
   535			return -EBUSY;
   536	
   537		if (handler->power_off_cb || handler->power_off_prepare_cb) {
   538			if (handler->power_off_priority == POWEROFF_PRIO_RESERVED)
   539				priority = POWEROFF_PRIO_DEFAULT;
   540			else
   541				priority = handler->power_off_priority;
   542	
   543			priv->power_off_nb.notifier_call = sys_off_handler_power_off;
   544			priv->power_off_nb.priority = priority;
   545	
   546			err = register_power_off_handler(&priv->power_off_nb);
   547			if (err)
   548				goto reset_sys_off_handler;
   549		}
   550	
   551		if (handler->restart_cb) {
   552			if (handler->restart_priority == RESTART_PRIO_RESERVED)
   553				priority = RESTART_PRIO_DEFAULT;
   554			else
   555				priority = handler->restart_priority;
   556	
   557			priv->restart_nb.notifier_call = sys_off_handler_restart;
   558			priv->restart_nb.priority = priority;
   559	
   560			err = register_restart_handler(&priv->restart_nb);
   561			if (err)
   562				goto unreg_power_off_handler;
   563		}
   564	
   565		if (handler->reboot_prepare_cb) {
   566			priv->reboot_nb.notifier_call = sys_off_handler_reboot;
   567			priv->reboot_nb.priority = handler->reboot_priority;
   568	
   569			err = register_reboot_notifier(&priv->reboot_nb);
   570			if (err)
   571				goto unreg_restart_handler;
   572		}
   573	
   574		priv->registered = true;
   575	
   576		return 0;
   577	
   578	unreg_restart_handler:
   579		if (handler->restart_cb)
   580			unregister_restart_handler(&priv->restart_nb);
   581	
   582	unreg_power_off_handler:
   583		if (handler->power_off_cb)
   584			unregister_power_off_handler(&priv->power_off_nb);
   585	
   586	reset_sys_off_handler:
   587		memset(priv, 0, sizeof(*priv));
   588	
   589		return err;
   590	}
   591	EXPORT_SYMBOL(register_sys_off_handler);
   592	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ