tree:
https://github.com/l1k/linux spi_fixes
head: 6054604029840934356e70a291269c72fe863b48
commit: ef8e19f732296908c0ad49a6e3d84d65e61625dc [7/24] spi: Introduce device-managed SPI
controller allocation
config: powerpc-randconfig-r033-20201111 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
874b0a0b9db93f5d3350ffe6b5efda2d908415d0)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
#
https://github.com/l1k/linux/commit/ef8e19f732296908c0ad49a6e3d84d65e61625dc
git remote add l1k
https://github.com/l1k/linux
git fetch --no-tags l1k spi_fixes
git checkout ef8e19f732296908c0ad49a6e3d84d65e61625dc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/spi/spi.c:2886:19: error: incompatible pointer types
passing 'struct device **' to parameter of type 'struct device *'; remove
& [-Werror,-Wincompatible-pointer-types]
if
(!devres_find(&ctlr->dev.parent, devm_spi_release_controller,
^~~~~~~~~~~~~~~~~
include/linux/device.h:190:34: note: passing argument to parameter 'dev' here
void *devres_find(struct device *dev, dr_release_t release,
^
1 error generated.
vim +2886 drivers/spi/spi.c
2845
2846 /**
2847 * spi_unregister_controller - unregister SPI master or slave controller
2848 * @ctlr: the controller being unregistered
2849 * Context: can sleep
2850 *
2851 * This call is used only by SPI controller drivers, which are the
2852 * only ones directly touching chip registers.
2853 *
2854 * This must be called from context that can sleep.
2855 *
2856 * Note that this function also drops a reference to the controller.
2857 */
2858 void spi_unregister_controller(struct spi_controller *ctlr)
2859 {
2860 struct spi_controller *found;
2861 int id = ctlr->bus_num;
2862
2863 /* Prevent addition of new devices, unregister existing ones */
2864 if (IS_ENABLED(CONFIG_SPI_DYNAMIC))
2865 mutex_lock(&spi_add_lock);
2866
2867 device_for_each_child(&ctlr->dev, NULL, __unregister);
2868
2869 /* First make sure that this controller was ever added */
2870 mutex_lock(&board_lock);
2871 found = idr_find(&spi_master_idr, id);
2872 mutex_unlock(&board_lock);
2873 if (ctlr->queued) {
2874 if (spi_destroy_queue(ctlr))
2875 dev_err(&ctlr->dev, "queue remove failed\n");
2876 }
2877 mutex_lock(&board_lock);
2878 list_del(&ctlr->list);
2879 mutex_unlock(&board_lock);
2880
2881 device_del(&ctlr->dev);
2882
2883 /* Release the last reference on the controller if its driver
2884 * has not yet been converted to devm_spi_alloc_master/slave().
2885 */
2886 if (!devres_find(&ctlr->dev.parent,
devm_spi_release_controller,
2887 devm_spi_match_controller, ctlr))
2888 put_device(&ctlr->dev);
2889
2890 /* free bus id */
2891 mutex_lock(&board_lock);
2892 if (found == ctlr)
2893 idr_remove(&spi_master_idr, id);
2894 mutex_unlock(&board_lock);
2895
2896 if (IS_ENABLED(CONFIG_SPI_DYNAMIC))
2897 mutex_unlock(&spi_add_lock);
2898 }
2899 EXPORT_SYMBOL_GPL(spi_unregister_controller);
2900
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org