[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202401080110.6j92FbQa-lkp@intel.com>
Date: Mon, 8 Jan 2024 01:45:12 +0800
From: kernel test robot <lkp@...el.com>
To: Rafał Miłecki <rafal@...ecki.pl>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Matthias Brugger <matthias.bgg@...il.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: drivers/nvmem/meson-efuse.c:78:12: warning: cast from 'void
(*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function
type
Hi Rafał,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 52b1853b080a082ec3749c3a9577f6c71b1d4a90
commit: 28fc7c986f01fdcfd28af648be2597624cac0e27 nvmem: prefix all symbols with NVMEM_
date: 1 year, 3 months ago
config: arm64-randconfig-001-20240107 (https://download.01.org/0day-ci/archive/20240108/202401080110.6j92FbQa-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 7e186d366d6c7def0543acc255931f617e76dff0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240108/202401080110.6j92FbQa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401080110.6j92FbQa-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/nvmem/meson-efuse.c:78:12: warning: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict]
78 | (void(*)(void *))clk_disable_unprepare,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +78 drivers/nvmem/meson-efuse.c
ad855eae6caf0d Carlo Caione 2016-08-27 40
ad855eae6caf0d Carlo Caione 2016-08-27 41 static int meson_efuse_probe(struct platform_device *pdev)
ad855eae6caf0d Carlo Caione 2016-08-27 42 {
401488d121a4ec Jerome Brunet 2018-05-11 43 struct device *dev = &pdev->dev;
8cde3c2153e8f5 Carlo Caione 2019-07-31 44 struct meson_sm_firmware *fw;
8cde3c2153e8f5 Carlo Caione 2019-07-31 45 struct device_node *sm_np;
ad855eae6caf0d Carlo Caione 2016-08-27 46 struct nvmem_device *nvmem;
401488d121a4ec Jerome Brunet 2018-05-11 47 struct nvmem_config *econfig;
611fbca1c86197 Jerome Brunet 2018-11-30 48 struct clk *clk;
ad855eae6caf0d Carlo Caione 2016-08-27 49 unsigned int size;
611fbca1c86197 Jerome Brunet 2018-11-30 50 int ret;
611fbca1c86197 Jerome Brunet 2018-11-30 51
8cde3c2153e8f5 Carlo Caione 2019-07-31 52 sm_np = of_parse_phandle(pdev->dev.of_node, "secure-monitor", 0);
8cde3c2153e8f5 Carlo Caione 2019-07-31 53 if (!sm_np) {
8cde3c2153e8f5 Carlo Caione 2019-07-31 54 dev_err(&pdev->dev, "no secure-monitor node\n");
8cde3c2153e8f5 Carlo Caione 2019-07-31 55 return -ENODEV;
8cde3c2153e8f5 Carlo Caione 2019-07-31 56 }
8cde3c2153e8f5 Carlo Caione 2019-07-31 57
8cde3c2153e8f5 Carlo Caione 2019-07-31 58 fw = meson_sm_get(sm_np);
8cde3c2153e8f5 Carlo Caione 2019-07-31 59 of_node_put(sm_np);
8cde3c2153e8f5 Carlo Caione 2019-07-31 60 if (!fw)
8cde3c2153e8f5 Carlo Caione 2019-07-31 61 return -EPROBE_DEFER;
8cde3c2153e8f5 Carlo Caione 2019-07-31 62
611fbca1c86197 Jerome Brunet 2018-11-30 63 clk = devm_clk_get(dev, NULL);
611fbca1c86197 Jerome Brunet 2018-11-30 64 if (IS_ERR(clk)) {
611fbca1c86197 Jerome Brunet 2018-11-30 65 ret = PTR_ERR(clk);
611fbca1c86197 Jerome Brunet 2018-11-30 66 if (ret != -EPROBE_DEFER)
611fbca1c86197 Jerome Brunet 2018-11-30 67 dev_err(dev, "failed to get efuse gate");
611fbca1c86197 Jerome Brunet 2018-11-30 68 return ret;
611fbca1c86197 Jerome Brunet 2018-11-30 69 }
611fbca1c86197 Jerome Brunet 2018-11-30 70
611fbca1c86197 Jerome Brunet 2018-11-30 71 ret = clk_prepare_enable(clk);
611fbca1c86197 Jerome Brunet 2018-11-30 72 if (ret) {
611fbca1c86197 Jerome Brunet 2018-11-30 73 dev_err(dev, "failed to enable gate");
611fbca1c86197 Jerome Brunet 2018-11-30 74 return ret;
611fbca1c86197 Jerome Brunet 2018-11-30 75 }
611fbca1c86197 Jerome Brunet 2018-11-30 76
611fbca1c86197 Jerome Brunet 2018-11-30 77 ret = devm_add_action_or_reset(dev,
611fbca1c86197 Jerome Brunet 2018-11-30 @78 (void(*)(void *))clk_disable_unprepare,
611fbca1c86197 Jerome Brunet 2018-11-30 79 clk);
611fbca1c86197 Jerome Brunet 2018-11-30 80 if (ret) {
611fbca1c86197 Jerome Brunet 2018-11-30 81 dev_err(dev, "failed to add disable callback");
611fbca1c86197 Jerome Brunet 2018-11-30 82 return ret;
611fbca1c86197 Jerome Brunet 2018-11-30 83 }
ad855eae6caf0d Carlo Caione 2016-08-27 84
8cde3c2153e8f5 Carlo Caione 2019-07-31 85 if (meson_sm_call(fw, SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) {
8649dbe58d359c Jerome Brunet 2018-11-30 86 dev_err(dev, "failed to get max user");
ad855eae6caf0d Carlo Caione 2016-08-27 87 return -EINVAL;
8649dbe58d359c Jerome Brunet 2018-11-30 88 }
ad855eae6caf0d Carlo Caione 2016-08-27 89
401488d121a4ec Jerome Brunet 2018-05-11 90 econfig = devm_kzalloc(dev, sizeof(*econfig), GFP_KERNEL);
401488d121a4ec Jerome Brunet 2018-05-11 91 if (!econfig)
401488d121a4ec Jerome Brunet 2018-05-11 92 return -ENOMEM;
401488d121a4ec Jerome Brunet 2018-05-11 93
401488d121a4ec Jerome Brunet 2018-05-11 94 econfig->dev = dev;
401488d121a4ec Jerome Brunet 2018-05-11 95 econfig->name = dev_name(dev);
401488d121a4ec Jerome Brunet 2018-05-11 96 econfig->stride = 1;
401488d121a4ec Jerome Brunet 2018-05-11 97 econfig->word_size = 1;
401488d121a4ec Jerome Brunet 2018-05-11 98 econfig->reg_read = meson_efuse_read;
e55077307d6f7c Jerome Brunet 2018-05-11 99 econfig->reg_write = meson_efuse_write;
401488d121a4ec Jerome Brunet 2018-05-11 100 econfig->size = size;
8cde3c2153e8f5 Carlo Caione 2019-07-31 101 econfig->priv = fw;
ad855eae6caf0d Carlo Caione 2016-08-27 102
401488d121a4ec Jerome Brunet 2018-05-11 103 nvmem = devm_nvmem_register(&pdev->dev, econfig);
ad855eae6caf0d Carlo Caione 2016-08-27 104
90696a4097e35f Andrey Smirnov 2018-03-09 105 return PTR_ERR_OR_ZERO(nvmem);
ad855eae6caf0d Carlo Caione 2016-08-27 106 }
ad855eae6caf0d Carlo Caione 2016-08-27 107
:::::: The code at line 78 was first introduced by commit
:::::: 611fbca1c861976e95a5244acf9f40bb0981977c nvmem: meson-efuse: add peripheral clock
:::::: TO: Jerome Brunet <jbrunet@...libre.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists