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: <202205032215.0V3jamj1-lkp@intel.com>
Date:   Tue, 3 May 2022 23:06:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hector Martin <marcan@...can.st>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [asahilinux:bits/110-smc 13/14]
 drivers/input/misc/macsmc-hid.c:59:37: error: implicit declaration of
 function 'kernel_can_power_off'; did you mean 'kernel_power_off'?

tree:   https://github.com/AsahiLinux/linux bits/110-smc
head:   dc3db43287ff1d44b447fff8ed6386b28b339f1c
commit: 0f263115481acb56629afae7ff2bda87b8aef659 [13/14] Input: macsmc-hid: New driver to handle the Apple Mac SMC buttons/lid
config: arm64-randconfig-c003-20220501 (https://download.01.org/0day-ci/archive/20220503/202205032215.0V3jamj1-lkp@intel.com/config)
compiler: aarch64-linux-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/0f263115481acb56629afae7ff2bda87b8aef659
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux bits/110-smc
        git checkout 0f263115481acb56629afae7ff2bda87b8aef659
        # 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=arm64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   drivers/input/misc/macsmc-hid.c: In function 'macsmc_hid_event':
>> drivers/input/misc/macsmc-hid.c:59:37: error: implicit declaration of function 'kernel_can_power_off'; did you mean 'kernel_power_off'? [-Werror=implicit-function-declaration]
      59 |                                 if (kernel_can_power_off())
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     kernel_power_off
   cc1: some warnings being treated as errors


vim +59 drivers/input/misc/macsmc-hid.c

    29	
    30	static int macsmc_hid_event(struct notifier_block *nb, unsigned long event, void *data)
    31	{
    32		struct macsmc_hid *smchid = container_of(nb, struct macsmc_hid, nb);
    33		u16 type = event >> 16;
    34		u8 d1 = (event >> 8) & 0xff;
    35		u8 d2 = event & 0xff;
    36	
    37		switch (type) {
    38		case SMC_EV_BTN:
    39			switch (d1) {
    40			case BTN_POWER:
    41				input_report_key(smchid->input, KEY_POWER, d2);
    42				input_sync(smchid->input);
    43				break;
    44			case BTN_POWER_HELD1:
    45				/*
    46				 * TODO: is this pre-warning useful?
    47				 */
    48				if (d2)
    49					dev_warn(smchid->dev, "Power button held down\n");
    50				break;
    51			case BTN_POWER_HELD2:
    52				/*
    53				 * If we get here, we have about 4 seconds before forced shutdown.
    54				 * Try to do an emergency shutdown to make sure the NVMe cache is
    55				 * flushed. macOS actually does this by panicing (!)...
    56				 */
    57				if (d2) {
    58					dev_crit(smchid->dev, "Triggering forced shutdown!\n");
  > 59					if (kernel_can_power_off())
    60						kernel_power_off();
    61					else /* Missing macsmc-reboot driver? */
    62						kernel_restart("SMC power button triggered restart");
    63				}
    64				break;
    65			default:
    66				dev_info(smchid->dev, "Unknown SMC button event: %02x %02x\n", d1, d2);
    67				break;
    68			}
    69			return NOTIFY_OK;
    70		case SMC_EV_LID:
    71			input_report_switch(smchid->input, SW_LID, d1);
    72			input_sync(smchid->input);
    73			return NOTIFY_OK;
    74		}
    75	
    76		return NOTIFY_DONE;
    77	}
    78	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ