* Re: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
[not found] <20230324063317.14664-3-zhuyinbo@loongson.cn>
@ 2023-03-24 10:15 ` kernel test robot
2023-03-27 8:24 ` zhuyinbo
2023-03-24 21:53 ` kernel test robot
1 sibling, 1 reply; 4+ messages in thread
From: kernel test robot @ 2023-03-24 10:15 UTC (permalink / raw)
To: Yinbo Zhu, Mark Brown, Rob Herring, Krzysztof Kozlowski,
linux-spi, devicetree, linux-kernel
Cc: oe-kbuild-all, Jianmin Lv, wanghongliang, Liu Peibao,
loongson-kernel, Yinbo Zhu
Hi Yinbo,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-spi/for-next]
[also build test ERROR on robh/for-next krzk-dt/for-next linus/master v6.3-rc3 next-20230324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link: https://lore.kernel.org/r/20230324063317.14664-3-zhuyinbo%40loongson.cn
patch subject: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230324/202303241811.OXj9KxAr-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3742622c455d25c4a110d2caf2f5b2ceefe88f91
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
git checkout 3742622c455d25c4a110d2caf2f5b2ceefe88f91
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303241811.OXj9KxAr-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/spi/spi-loongson-core.c: In function 'loongson_spi_init_master':
>> drivers/spi/spi-loongson-core.c:229:21: error: implicit declaration of function 'devm_ioremap'; did you mean 'of_ioremap'? [-Werror=implicit-function-declaration]
229 | spi->base = devm_ioremap(dev, res->start, resource_size(res));
| ^~~~~~~~~~~~
| of_ioremap
>> drivers/spi/spi-loongson-core.c:229:19: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
229 | spi->base = devm_ioremap(dev, res->start, resource_size(res));
| ^
cc1: some warnings being treated as errors
vim +229 drivers/spi/spi-loongson-core.c
201
202 int loongson_spi_init_master(struct device *dev, struct resource *res)
203 {
204 struct spi_master *master;
205 struct loongson_spi *spi;
206 struct clk *clk;
207 int ret;
208
209 master = spi_alloc_master(dev, sizeof(struct loongson_spi));
210 if (master == NULL) {
211 dev_dbg(dev, "master allocation failed\n");
212 return -ENOMEM;
213 }
214
215 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
216 master->setup = loongson_spi_setup;
217 master->prepare_message = loongson_spi_prepare_message;
218 master->transfer_one = loongson_spi_transfer_one;
219 master->unprepare_message = loongson_spi_unprepare_message;
220 master->set_cs = loongson_spi_set_cs;
221 master->num_chipselect = 4;
222 master->dev.of_node = of_node_get(dev->of_node);
223 dev_set_drvdata(dev, master);
224
225 spi = spi_master_get_devdata(master);
226
227 spi->master = master;
228
> 229 spi->base = devm_ioremap(dev, res->start, resource_size(res));
230 if (spi->base == NULL) {
231 dev_err(dev, "cannot map io\n");
232 ret = -ENXIO;
233 goto free_master;
234 }
235
236 clk = devm_clk_get(dev, NULL);
237 if (!IS_ERR(clk))
238 spi->clk_rate = clk_get_rate(clk);
239
240 loongson_spi_reginit(spi);
241
242 spi->mode = 0;
243 if (of_get_property(dev->of_node, "spi-nocs", NULL))
244 spi->mode |= SPI_NO_CS;
245
246 ret = spi_register_master(master);
247 if (ret < 0)
248 goto free_master;
249
250 return ret;
251
252 free_master:
253 kfree(master);
254 spi_master_put(master);
255
256 return ret;
257 }
258 EXPORT_SYMBOL_GPL(loongson_spi_init_master);
259
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
[not found] <20230324063317.14664-3-zhuyinbo@loongson.cn>
2023-03-24 10:15 ` [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller kernel test robot
@ 2023-03-24 21:53 ` kernel test robot
2023-03-27 7:47 ` zhuyinbo
1 sibling, 1 reply; 4+ messages in thread
From: kernel test robot @ 2023-03-24 21:53 UTC (permalink / raw)
To: Yinbo Zhu, Mark Brown, Rob Herring, Krzysztof Kozlowski,
linux-spi, devicetree, linux-kernel
Cc: oe-kbuild-all, Jianmin Lv, wanghongliang, Liu Peibao,
loongson-kernel, Yinbo Zhu
Hi Yinbo,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-spi/for-next]
[also build test ERROR on robh/for-next krzk-dt/for-next linus/master v6.3-rc3 next-20230324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link: https://lore.kernel.org/r/20230324063317.14664-3-zhuyinbo%40loongson.cn
patch subject: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20230325/202303250536.OV1LR58y-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3742622c455d25c4a110d2caf2f5b2ceefe88f91
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
git checkout 3742622c455d25c4a110d2caf2f5b2ceefe88f91
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303250536.OV1LR58y-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "loongson_spi_dev_pm_ops" [drivers/spi/spi-loongson-pci.ko] undefined!
>> ERROR: modpost: "loongson_spi_dev_pm_ops" [drivers/spi/spi-loongson-plat.ko] undefined!
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
2023-03-24 21:53 ` kernel test robot
@ 2023-03-27 7:47 ` zhuyinbo
0 siblings, 0 replies; 4+ messages in thread
From: zhuyinbo @ 2023-03-27 7:47 UTC (permalink / raw)
To: kernel test robot, Mark Brown, Rob Herring, Krzysztof Kozlowski,
linux-spi, devicetree, linux-kernel
Cc: oe-kbuild-all, Jianmin Lv, wanghongliang, Liu Peibao,
loongson-kernel, zhuyinbo
在 2023/3/25 上午5:53, kernel test robot 写道:
> Hi Yinbo,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on broonie-spi/for-next]
> [also build test ERROR on robh/for-next krzk-dt/for-next linus/master v6.3-rc3 next-20230324]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
> base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
> patch link: https://lore.kernel.org/r/20230324063317.14664-3-zhuyinbo%40loongson.cn
> patch subject: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20230325/202303250536.OV1LR58y-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3742622c455d25c4a110d2caf2f5b2ceefe88f91
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
> git checkout 3742622c455d25c4a110d2caf2f5b2ceefe88f91
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303250536.OV1LR58y-lkp@intel.com/
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
>>> ERROR: modpost: "loongson_spi_dev_pm_ops" [drivers/spi/spi-loongson-pci.ko] undefined!
>>> ERROR: modpost: "loongson_spi_dev_pm_ops" [drivers/spi/spi-loongson-plat.ko] undefined!
>
This compile issue when spi config was set as module then
"loongson_spi_dev_pm_ops undefined" will occur, but if set spi config as
built-in and not this issue, and my patch was tested that use spi config
built-in so not this error occur, and this compile fail issue's reason
was "loongson_spi_dev_pm_ops" not use EXPORT_SYMBOL_GPL to export, I
will add following change to fix this compile error issue.
--- a/drivers/spi/spi-loongson-core.c
+++ b/drivers/spi/spi-loongson-core.c
@@ -297,6 +297,7 @@ const struct dev_pm_ops loongson_spi_dev_pm_ops = {
.suspend = loongson_spi_suspend,
.resume = loongson_spi_resume,
};
+EXPORT_SYMBOL_GPL(loongson_spi_dev_pm_ops);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
2023-03-24 10:15 ` [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller kernel test robot
@ 2023-03-27 8:24 ` zhuyinbo
0 siblings, 0 replies; 4+ messages in thread
From: zhuyinbo @ 2023-03-27 8:24 UTC (permalink / raw)
To: kernel test robot, Mark Brown, Rob Herring, Krzysztof Kozlowski,
linux-spi, devicetree, linux-kernel
Cc: oe-kbuild-all, Jianmin Lv, wanghongliang, Liu Peibao,
loongson-kernel, zhuyinbo
在 2023/3/24 下午6:15, kernel test robot 写道:
> Hi Yinbo,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on broonie-spi/for-next]
> [also build test ERROR on robh/for-next krzk-dt/for-next linus/master v6.3-rc3 next-20230324]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
> base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
> patch link: https://lore.kernel.org/r/20230324063317.14664-3-zhuyinbo%40loongson.cn
> patch subject: [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller
> config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230324/202303241811.OXj9KxAr-lkp@intel.com/config)
> compiler: sparc64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/3742622c455d25c4a110d2caf2f5b2ceefe88f91
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Yinbo-Zhu/dt-bindings-spi-add-loongson-spi/20230324-143432
> git checkout 3742622c455d25c4a110d2caf2f5b2ceefe88f91
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303241811.OXj9KxAr-lkp@intel.com/
>
> All error/warnings (new ones prefixed by >>):
>
> drivers/spi/spi-loongson-core.c: In function 'loongson_spi_init_master':
>>> drivers/spi/spi-loongson-core.c:229:21: error: implicit declaration of function 'devm_ioremap'; did you mean 'of_ioremap'? [-Werror=implicit-function-declaration]
> 229 | spi->base = devm_ioremap(dev, res->start, resource_size(res));
> | ^~~~~~~~~~~~
> | of_ioremap
>>> drivers/spi/spi-loongson-core.c:229:19: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 229 | spi->base = devm_ioremap(dev, res->start, resource_size(res));
> | ^
> cc1: some warnings being treated as errorThe devm_ioremap was declared in linux/io.h, and I think add include
<linux/io.h> in spi-loongson-core.c that compile issue will be fixed.
>
>
> vim +229 drivers/spi/spi-loongson-core.c
>
> 201
> 202 int loongson_spi_init_master(struct device *dev, struct resource *res)
> 203 {
> 204 struct spi_master *master;
> 205 struct loongson_spi *spi;
> 206 struct clk *clk;
> 207 int ret;
> 208
> 209 master = spi_alloc_master(dev, sizeof(struct loongson_spi));
> 210 if (master == NULL) {
> 211 dev_dbg(dev, "master allocation failed\n");
> 212 return -ENOMEM;
> 213 }
> 214
> 215 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
> 216 master->setup = loongson_spi_setup;
> 217 master->prepare_message = loongson_spi_prepare_message;
> 218 master->transfer_one = loongson_spi_transfer_one;
> 219 master->unprepare_message = loongson_spi_unprepare_message;
> 220 master->set_cs = loongson_spi_set_cs;
> 221 master->num_chipselect = 4;
> 222 master->dev.of_node = of_node_get(dev->of_node);
> 223 dev_set_drvdata(dev, master);
> 224
> 225 spi = spi_master_get_devdata(master);
> 226
> 227 spi->master = master;
> 228
> > 229 spi->base = devm_ioremap(dev, res->start, resource_size(res));
> 230 if (spi->base == NULL) {
> 231 dev_err(dev, "cannot map io\n");
> 232 ret = -ENXIO;
> 233 goto free_master;
> 234 }
> 235
> 236 clk = devm_clk_get(dev, NULL);
> 237 if (!IS_ERR(clk))
> 238 spi->clk_rate = clk_get_rate(clk);
> 239
> 240 loongson_spi_reginit(spi);
> 241
> 242 spi->mode = 0;
> 243 if (of_get_property(dev->of_node, "spi-nocs", NULL))
> 244 spi->mode |= SPI_NO_CS;
> 245
> 246 ret = spi_register_master(master);
> 247 if (ret < 0)
> 248 goto free_master;
> 249
> 250 return ret;
> 251
> 252 free_master:
> 253 kfree(master);
> 254 spi_master_put(master);
> 255
> 256 return ret;
> 257 }
> 258 EXPORT_SYMBOL_GPL(loongson_spi_init_master);
> 259
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-27 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230324063317.14664-3-zhuyinbo@loongson.cn>
2023-03-24 10:15 ` [PATCH v3 2/2] spi: loongson: add bus driver for the loongson spi controller kernel test robot
2023-03-27 8:24 ` zhuyinbo
2023-03-24 21:53 ` kernel test robot
2023-03-27 7:47 ` zhuyinbo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).