Hi YingKun,
kernel test robot noticed the following build errors:
[auto build test ERROR on 1fbcc5ab1c7a172ef1159b154c296fe1e9ce209b]
url: https://github.com/intel-lab-lkp/linux/commits/YingKun-Meng/ASoC-loongson-Ad... base: 1fbcc5ab1c7a172ef1159b154c296fe1e9ce209b patch link: https://lore.kernel.org/r/20230605120934.2306548-1-mengyingkun%40loongson.cn patch subject: [PATCH 1/3] ASoC: Add support for Loongson I2S controller config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230606/202306060320.Sphw0ihy-lkp@i...) compiler: sh4-linux-gcc (GCC) 12.3.0 reproduce (this is a W=1 build): mkdir -p ~/bin 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/cb79a1df70a849f772428740eb3c15... git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review YingKun-Meng/ASoC-loongson-Add-Loongson-Generic-ASoC-Sound-Card-Support/20230605-215940 git checkout cb79a1df70a849f772428740eb3c155da83de25b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=sh olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash sound/soc/loongson/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202306060320.Sphw0ihy-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
sound/soc/loongson/loongson_i2s_pci.c: In function 'loongson_pcm_hw_params': sound/soc/loongson/loongson_i2s_pci.c:171:45: warning: right shift count >= width of type [-Wshift-count-overflow] 171 | desc->order_hi = order_addr >> 32; | ^~ sound/soc/loongson/loongson_i2s_pci.c:174:43: warning: right shift count >= width of type [-Wshift-count-overflow] 174 | desc->saddr_hi = mem_addr >> 32; | ^~ sound/soc/loongson/loongson_i2s_pci.c:190:57: warning: right shift count >= width of type [-Wshift-count-overflow] 190 | desc->order_hi = prtd->dma_desc_arr_phy >> 32; | ^~ sound/soc/loongson/loongson_i2s_pci.c: In function 'loongson_i2s_pci_probe':
sound/soc/loongson/loongson_i2s_pci.c:364:15: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
364 | ret = pci_request_region(pdev, BAR_NUM, LS_I2S_DRVNAME); | ^~~~~~~~~~~~~~~~~~ | pci_request_regions
sound/soc/loongson/loongson_i2s_pci.c:379:25: error: implicit declaration of function 'pci_iomap'; did you mean 'pcim_iomap'? [-Werror=implicit-function-declaration]
379 | i2s->reg_base = pci_iomap(pdev, BAR_NUM, 0); | ^~~~~~~~~ | pcim_iomap
sound/soc/loongson/loongson_i2s_pci.c:379:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
379 | i2s->reg_base = pci_iomap(pdev, BAR_NUM, 0); | ^ sound/soc/loongson/loongson_i2s_pci.c:397:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 397 | tx_data->dev_addr = (u64)i2s->reg_base + LS_I2S_TX_DATA; | ^ sound/soc/loongson/loongson_i2s_pci.c:400:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 400 | rx_data->dev_addr = (u64)i2s->reg_base + LS_I2S_RX_DATA; | ^
sound/soc/loongson/loongson_i2s_pci.c:441:9: error: implicit declaration of function 'pci_iounmap'; did you mean 'pcim_iounmap'? [-Werror=implicit-function-declaration]
441 | pci_iounmap(pdev, i2s->reg_base); | ^~~~~~~~~~~ | pcim_iounmap
sound/soc/loongson/loongson_i2s_pci.c:443:9: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
443 | pci_release_region(pdev, BAR_NUM); | ^~~~~~~~~~~~~~~~~~ | pci_release_regions sound/soc/loongson/loongson_i2s_pci.c: At top level:
sound/soc/loongson/loongson_i2s_pci.c:474:1: warning: data definition has no type or storage class
474 | module_pci_driver(loongson_i2s_driver); | ^~~~~~~~~~~~~~~~~
sound/soc/loongson/loongson_i2s_pci.c:474:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int] sound/soc/loongson/loongson_i2s_pci.c:474:1: warning: parameter names (without types) in function declaration
sound/soc/loongson/loongson_i2s_pci.c:464:26: warning: 'loongson_i2s_driver' defined but not used [-Wunused-variable] 464 | static struct pci_driver loongson_i2s_driver = { | ^~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors
vim +364 sound/soc/loongson/loongson_i2s_pci.c
350 351 static int loongson_i2s_pci_probe(struct pci_dev *pdev, 352 const struct pci_device_id *pid) 353 { 354 const struct fwnode_handle *fwnode = pdev->dev.fwnode; 355 struct loongson_dma_data *tx_data, *rx_data; 356 struct loongson_i2s *i2s; 357 int ret; 358 359 if (pci_enable_device(pdev)) { 360 dev_err(&pdev->dev, "pci_enable_device failed\n"); 361 return -ENODEV; 362 } 363
364 ret = pci_request_region(pdev, BAR_NUM, LS_I2S_DRVNAME);
365 if (ret) { 366 dev_err(&pdev->dev, "request regions failed %d\n", ret); 367 goto err_disable; 368 } 369 370 i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); 371 if (!i2s) { 372 ret = -ENOMEM; 373 goto err_release; 374 } 375 i2s->rev_id = pdev->revision; 376 i2s->dev = &pdev->dev; 377 pci_set_drvdata(pdev, i2s); 378
379 i2s->reg_base = pci_iomap(pdev, BAR_NUM, 0);
380 if (!i2s->reg_base) { 381 dev_err(&pdev->dev, "pci_iomap_error\n"); 382 ret = -EIO; 383 goto err_release; 384 } 385 386 i2s->regmap = devm_regmap_init_mmio(&pdev->dev, i2s->reg_base, 387 &loongson_i2s_regmap_config); 388 if (IS_ERR(i2s->regmap)) { 389 dev_err(&pdev->dev, "Failed to initialize register map"); 390 ret = PTR_ERR(i2s->regmap); 391 goto err_unmap; 392 } 393 394 tx_data = &i2s->tx_dma_data; 395 rx_data = &i2s->rx_dma_data; 396 397 tx_data->dev_addr = (u64)i2s->reg_base + LS_I2S_TX_DATA; 398 tx_data->order_addr = i2s->reg_base + LS_I2S_TX_ORDER; 399 400 rx_data->dev_addr = (u64)i2s->reg_base + LS_I2S_RX_DATA; 401 rx_data->order_addr = i2s->reg_base + LS_I2S_RX_ORDER; 402 403 tx_data->irq = fwnode_irq_get_byname(fwnode, "tx"); 404 if (tx_data->irq < 0) { 405 dev_err(&pdev->dev, "dma tx irq invalid\n"); 406 ret = tx_data->irq; 407 goto err_unmap; 408 } 409 410 rx_data->irq = fwnode_irq_get_byname(fwnode, "rx"); 411 if (rx_data->irq < 0) { 412 dev_err(&pdev->dev, "dma rx irq invalid\n"); 413 ret = rx_data->irq; 414 goto err_unmap; 415 } 416 417 device_property_read_u32(&pdev->dev, "clock-frequency", &i2s->clk_rate); 418 if (!i2s->clk_rate) { 419 dev_err(&pdev->dev, "clock-frequency property invalid\n"); 420 ret = -EINVAL; 421 goto err_unmap; 422 } 423 424 dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 425 426 dev_set_name(&pdev->dev, "%s", loongson_i2s_dai.name); 427 428 loongson_i2s_init(i2s); 429 430 ret = devm_snd_soc_register_component(&pdev->dev, 431 &loongson_i2s_component, 432 &loongson_i2s_dai, 1); 433 if (ret) { 434 dev_err(&pdev->dev, "register DAI failed %d\n", ret); 435 goto err_unmap; 436 } 437 438 return 0; 439 440 err_unmap:
441 pci_iounmap(pdev, i2s->reg_base);
442 err_release:
443 pci_release_region(pdev, BAR_NUM);
444 err_disable: 445 pci_disable_device(pdev); 446 return ret; 447 } 448 449 static void loongson_i2s_pci_remove(struct pci_dev *pdev) 450 { 451 struct loongson_i2s *i2s = dev_get_drvdata(&pdev->dev); 452 453 pci_iounmap(pdev, i2s->reg_base); 454 pci_release_region(pdev, BAR_NUM); 455 pci_disable_device(pdev); 456 } 457 458 static const struct pci_device_id loongson_i2s_ids[] = { 459 { PCI_DEVICE(PCI_VENDOR_ID_LOONGSON, 0x7a27) }, 460 { }, 461 }; 462 MODULE_DEVICE_TABLE(pci, loongson_i2s_ids); 463 464 static struct pci_driver loongson_i2s_driver = { 465 .name = "loongson-i2s-pci", 466 .id_table = loongson_i2s_ids, 467 .probe = loongson_i2s_pci_probe, 468 .remove = loongson_i2s_pci_remove, 469 .driver = { 470 .owner = THIS_MODULE, 471 .pm = pm_sleep_ptr(&loongson_i2s_pm), 472 }, 473 };
474 module_pci_driver(loongson_i2s_driver);
475