[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211041544.R0jV58vk-lkp@intel.com>
Date: Fri, 4 Nov 2022 16:01:21 +0800
From: kernel test robot <lkp@...el.com>
To: Sven Peter <sven@...npeter.dev>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Hector Martin <marcan@...can.st>
Subject: drivers/soc/apple/sart.c:190:38: warning: cast from 'void (*)(struct
device *)' to 'void (*)(void *)' converts to incompatible function type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ee6050c8af96bba2f81e8b0793a1fc2f998fcd20
commit: b170143ae1113882731666aec9b9105356f1fc17 soc: apple: Add SART driver
date: 6 months ago
config: hexagon-randconfig-r041-20221104
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 2bbafe04fe785a9469bea5a3737f8d7d3ce4aca2)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b170143ae1113882731666aec9b9105356f1fc17
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b170143ae1113882731666aec9b9105356f1fc17
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/soc/apple/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/soc/apple/sart.c:190:38: warning: cast from 'void (*)(struct device *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict]
ret = devm_add_action_or_reset(dev, (void (*)(void *))put_device,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +190 drivers/soc/apple/sart.c
166
167 struct apple_sart *devm_apple_sart_get(struct device *dev)
168 {
169 struct device_node *sart_node;
170 struct platform_device *sart_pdev;
171 struct apple_sart *sart;
172 int ret;
173
174 sart_node = of_parse_phandle(dev->of_node, "apple,sart", 0);
175 if (!sart_node)
176 return ERR_PTR(-ENODEV);
177
178 sart_pdev = of_find_device_by_node(sart_node);
179 of_node_put(sart_node);
180
181 if (!sart_pdev)
182 return ERR_PTR(-ENODEV);
183
184 sart = dev_get_drvdata(&sart_pdev->dev);
185 if (!sart) {
186 put_device(&sart_pdev->dev);
187 return ERR_PTR(-EPROBE_DEFER);
188 }
189
> 190 ret = devm_add_action_or_reset(dev, (void (*)(void *))put_device,
191 &sart_pdev->dev);
192 if (ret)
193 return ERR_PTR(ret);
194
195 device_link_add(dev, &sart_pdev->dev,
196 DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_SUPPLIER);
197
198 return sart;
199 }
200 EXPORT_SYMBOL_GPL(devm_apple_sart_get);
201
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (98672 bytes)
Powered by blists - more mailing lists