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: <202109280419.EkhZXerm-lkp@intel.com>
Date:   Tue, 28 Sep 2021 04:58:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexandre Ghiti <alexandre.ghiti@...onical.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        0day robot <lkp@...el.com>
Subject: drivers/mfd/da9063-core.c:222:25: warning: cast between incompatible
 function types from 'int (*)(struct notifier_block *)' to 'void (*)(void *)'

tree:   https://github.com/0day-ci/linux/commits/Alexandre-Ghiti/drivers-mfd-da9063-Add-restart-notifier-implementation/20210922-143039
head:   8d78afddba48dbb0d8c398dd162799254653c5a3
commit: 8d78afddba48dbb0d8c398dd162799254653c5a3 drivers: mfd: da9063: Add restart notifier implementation
date:   6 days ago
config: nds32-buildonly-randconfig-r002-20210927 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/8d78afddba48dbb0d8c398dd162799254653c5a3
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexandre-Ghiti/drivers-mfd-da9063-Add-restart-notifier-implementation/20210922-143039
        git checkout 8d78afddba48dbb0d8c398dd162799254653c5a3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

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 >>):

   drivers/mfd/da9063-core.c: In function 'da9063_device_init':
>> drivers/mfd/da9063-core.c:222:25: warning: cast between incompatible function types from 'int (*)(struct notifier_block *)' to 'void (*)(void *)' [-Wcast-function-type]
     222 |                         (void (*)(void *))unregister_restart_handler,
         |                         ^


vim +222 drivers/mfd/da9063-core.c

   173	
   174	int da9063_device_init(struct da9063 *da9063, unsigned int irq)
   175	{
   176		int ret;
   177	
   178		ret = da9063_clear_fault_log(da9063);
   179		if (ret < 0)
   180			dev_err(da9063->dev, "Cannot clear fault log\n");
   181	
   182		da9063->flags = 0;
   183		da9063->irq_base = -1;
   184		da9063->chip_irq = irq;
   185	
   186		ret = da9063_irq_init(da9063);
   187		if (ret) {
   188			dev_err(da9063->dev, "Cannot initialize interrupts.\n");
   189			return ret;
   190		}
   191	
   192		da9063->irq_base = regmap_irq_chip_get_base(da9063->regmap_irq);
   193	
   194		ret = devm_mfd_add_devices(da9063->dev, PLATFORM_DEVID_NONE,
   195					   da9063_common_devs,
   196					   ARRAY_SIZE(da9063_common_devs),
   197					   NULL, da9063->irq_base, NULL);
   198		if (ret) {
   199			dev_err(da9063->dev, "Failed to add child devices\n");
   200			return ret;
   201		}
   202	
   203		if (da9063->type == PMIC_TYPE_DA9063) {
   204			ret = devm_mfd_add_devices(da9063->dev, PLATFORM_DEVID_NONE,
   205						   da9063_devs, ARRAY_SIZE(da9063_devs),
   206						   NULL, da9063->irq_base, NULL);
   207			if (ret) {
   208				dev_err(da9063->dev, "Failed to add child devices\n");
   209				return ret;
   210			}
   211		}
   212	
   213		da9063->restart_handler.notifier_call = da9063_restart_notify;
   214		da9063->restart_handler.priority = 128;
   215		ret = register_restart_handler(&da9063->restart_handler);
   216		if (ret) {
   217			dev_err(da9063->dev, "Failed to register restart handler\n");
   218			return ret;
   219		}
   220	
   221		devm_add_action(da9063->dev,
 > 222				(void (*)(void *))unregister_restart_handler,
   223				&da9063->restart_handler);
   224	
   225		return ret;
   226	}
   227	

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

Download attachment ".config.gz" of type "application/gzip" (28725 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ