[freescale-fslc:5.4-2.3.x-imx 14380/18813] drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared
by kernel test robot
Hi Jindong,
First bad commit (maybe != root cause):
tree: https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head: ef2339380856bee33c1ae25535ff0d72c92d02ad
commit: d29c65632f73063945b8ab29a5634573959e8539 [14380/18813] MA-17597-2 mfd: pca9450: Support module build
config: ia64-randconfig-r011-20210519 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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/Freescale/linux-fslc/commit/d29c65632f73063945b8ab29a5...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.4-2.3.x-imx
git checkout d29c65632f73063945b8ab29a5634573959e8539
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/mm.h:99,
from arch/ia64/include/asm/uaccess.h:38,
from include/linux/uaccess.h:11,
from arch/ia64/include/asm/sections.h:11,
from include/linux/interrupt.h:20,
from drivers/regulator/pca9450-regulator.c:18:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:137:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
137 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
drivers/regulator/pca9450-regulator.c: In function 'pca9450_probe':
>> drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared (first use in this function)
678 | desc->name = pca9450_matches[i].name;
| ^~~~~~~~~~~~~~~
drivers/regulator/pca9450-regulator.c:678:16: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/regulator/pca9450-regulator.c:149:44: warning: 'pca9450_ldo2_voltage_ranges' defined but not used [-Wunused-const-variable=]
149 | static const struct regulator_linear_range pca9450_ldo2_voltage_ranges[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/pca9450_matches +678 drivers/regulator/pca9450-regulator.c
c46712e52a8dd0 Robin Gong 2019-10-23 634
c46712e52a8dd0 Robin Gong 2019-10-23 635 /*
c46712e52a8dd0 Robin Gong 2019-10-23 636 * @brief probe pca9450 regulator device
c46712e52a8dd0 Robin Gong 2019-10-23 637 * @param pdev pca9450 regulator platform device
c46712e52a8dd0 Robin Gong 2019-10-23 638 * @retval 0 success
c46712e52a8dd0 Robin Gong 2019-10-23 639 * @retval negative fail
c46712e52a8dd0 Robin Gong 2019-10-23 640 */
c46712e52a8dd0 Robin Gong 2019-10-23 641 static int pca9450_probe(struct platform_device *pdev)
c46712e52a8dd0 Robin Gong 2019-10-23 642 {
c46712e52a8dd0 Robin Gong 2019-10-23 643 struct pca9450_pmic *pmic;
c46712e52a8dd0 Robin Gong 2019-10-23 644 struct pca9450_board *pdata;
c46712e52a8dd0 Robin Gong 2019-10-23 645 struct regulator_config config = {};
c46712e52a8dd0 Robin Gong 2019-10-23 646 struct pca9450 *pca9450 = dev_get_drvdata(pdev->dev.parent);
c46712e52a8dd0 Robin Gong 2019-10-23 647 struct of_regulator_match *matches = NULL;
c46712e52a8dd0 Robin Gong 2019-10-23 648 int i = 0, err, irq = 0, ret = 0;
c46712e52a8dd0 Robin Gong 2019-10-23 649
c46712e52a8dd0 Robin Gong 2019-10-23 650 pmic = kzalloc(sizeof(*pmic), GFP_KERNEL);
c46712e52a8dd0 Robin Gong 2019-10-23 651 if (!pmic)
c46712e52a8dd0 Robin Gong 2019-10-23 652 return -ENOMEM;
c46712e52a8dd0 Robin Gong 2019-10-23 653
c46712e52a8dd0 Robin Gong 2019-10-23 654 memcpy(pmic->descs, pca9450_regulators, sizeof(pmic->descs));
c46712e52a8dd0 Robin Gong 2019-10-23 655
c46712e52a8dd0 Robin Gong 2019-10-23 656 pmic->dev = &pdev->dev;
c46712e52a8dd0 Robin Gong 2019-10-23 657 pmic->mfd = pca9450;
c46712e52a8dd0 Robin Gong 2019-10-23 658 platform_set_drvdata(pdev, pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 659 pdata = dev_get_platdata(pca9450->dev);
c46712e52a8dd0 Robin Gong 2019-10-23 660
c46712e52a8dd0 Robin Gong 2019-10-23 661 if (!pdata && pca9450->dev->of_node) {
c46712e52a8dd0 Robin Gong 2019-10-23 662 pca9450_parse_dt_reg_data(pdev, &matches);
c46712e52a8dd0 Robin Gong 2019-10-23 663 if (matches == NULL) {
c46712e52a8dd0 Robin Gong 2019-10-23 664 dev_err(&pdev->dev, "Platform data not found\n");
c46712e52a8dd0 Robin Gong 2019-10-23 665 return -EINVAL;
c46712e52a8dd0 Robin Gong 2019-10-23 666 }
c46712e52a8dd0 Robin Gong 2019-10-23 667 }
c46712e52a8dd0 Robin Gong 2019-10-23 668
c46712e52a8dd0 Robin Gong 2019-10-23 669 /* Get buck dvs parameters */
c46712e52a8dd0 Robin Gong 2019-10-23 670 of_pca9450_buck_dvs(pdev, &pmic->buck_dvs[0]);
c46712e52a8dd0 Robin Gong 2019-10-23 671
c46712e52a8dd0 Robin Gong 2019-10-23 672 for (i = 0; i < PCA9450_REGULATOR_CNT; i++) {
c46712e52a8dd0 Robin Gong 2019-10-23 673 struct regulator_init_data *init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 674 struct regulator_desc *desc;
c46712e52a8dd0 Robin Gong 2019-10-23 675 struct regulator_dev *rdev;
c46712e52a8dd0 Robin Gong 2019-10-23 676
c46712e52a8dd0 Robin Gong 2019-10-23 677 desc = &pmic->descs[i];
c46712e52a8dd0 Robin Gong 2019-10-23 @678 desc->name = pca9450_matches[i].name;
c46712e52a8dd0 Robin Gong 2019-10-23 679
c46712e52a8dd0 Robin Gong 2019-10-23 680 if (pdata)
c46712e52a8dd0 Robin Gong 2019-10-23 681 init_data = pdata->init_data[i];
c46712e52a8dd0 Robin Gong 2019-10-23 682 else
c46712e52a8dd0 Robin Gong 2019-10-23 683 init_data = pca9450_matches[i].init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 684
c46712e52a8dd0 Robin Gong 2019-10-23 685 config.dev = pmic->dev;
c46712e52a8dd0 Robin Gong 2019-10-23 686 config.init_data = init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 687 config.driver_data = pmic;
c46712e52a8dd0 Robin Gong 2019-10-23 688 config.regmap = pca9450->regmap;
c46712e52a8dd0 Robin Gong 2019-10-23 689 if (matches)
c46712e52a8dd0 Robin Gong 2019-10-23 690 config.of_node = matches[i].of_node;
c46712e52a8dd0 Robin Gong 2019-10-23 691 dev_dbg(config.dev, "regulator register name '%s'\n",
c46712e52a8dd0 Robin Gong 2019-10-23 692 desc->name);
c46712e52a8dd0 Robin Gong 2019-10-23 693
c46712e52a8dd0 Robin Gong 2019-10-23 694 rdev = regulator_register(desc, &config);
c46712e52a8dd0 Robin Gong 2019-10-23 695 if (IS_ERR(rdev)) {
c46712e52a8dd0 Robin Gong 2019-10-23 696 dev_err(pca9450->dev,
c46712e52a8dd0 Robin Gong 2019-10-23 697 "failed to register %s regulator\n",
c46712e52a8dd0 Robin Gong 2019-10-23 698 desc->name);
c46712e52a8dd0 Robin Gong 2019-10-23 699 err = PTR_ERR(rdev);
c46712e52a8dd0 Robin Gong 2019-10-23 700 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 701 }
c46712e52a8dd0 Robin Gong 2019-10-23 702 pmic->rdev[i] = rdev;
c46712e52a8dd0 Robin Gong 2019-10-23 703 }
c46712e52a8dd0 Robin Gong 2019-10-23 704
c46712e52a8dd0 Robin Gong 2019-10-23 705 /* Init sysfs registers */
c46712e52a8dd0 Robin Gong 2019-10-23 706 pmic->reg_index = -1;
c46712e52a8dd0 Robin Gong 2019-10-23 707
c46712e52a8dd0 Robin Gong 2019-10-23 708 err = sysfs_create_group(&pdev->dev.kobj, &clk_attr_group);
c46712e52a8dd0 Robin Gong 2019-10-23 709 if (err != 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 710 dev_err(&pdev->dev, "Failed to create sysfs: %d\n", err);
c46712e52a8dd0 Robin Gong 2019-10-23 711 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 712 }
c46712e52a8dd0 Robin Gong 2019-10-23 713
c46712e52a8dd0 Robin Gong 2019-10-23 714 /* Init Buck1/2/3 dvs */
c46712e52a8dd0 Robin Gong 2019-10-23 715 err = pca9450_buck123_dvs_init(pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 716 if (err != 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 717 dev_err(&pdev->dev, "Failed to buck123 dvs: %d\n", err);
c46712e52a8dd0 Robin Gong 2019-10-23 718 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 719 }
c46712e52a8dd0 Robin Gong 2019-10-23 720
c46712e52a8dd0 Robin Gong 2019-10-23 721 /* Add Interrupt */
c46712e52a8dd0 Robin Gong 2019-10-23 722 irq = platform_get_irq(pdev, 0);
c46712e52a8dd0 Robin Gong 2019-10-23 723 if (irq <= 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 724 dev_warn(&pdev->dev, "platform irq error # %d\n", irq);
c46712e52a8dd0 Robin Gong 2019-10-23 725 return -ENXIO;
c46712e52a8dd0 Robin Gong 2019-10-23 726 }
c46712e52a8dd0 Robin Gong 2019-10-23 727 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
c46712e52a8dd0 Robin Gong 2019-10-23 728 pca9450_pmic_interrupt,
c46712e52a8dd0 Robin Gong 2019-10-23 729 IRQF_TRIGGER_LOW | IRQF_EARLY_RESUME,
c46712e52a8dd0 Robin Gong 2019-10-23 730 dev_name(&pdev->dev), &pdev->dev);
c46712e52a8dd0 Robin Gong 2019-10-23 731 if (ret < 0)
c46712e52a8dd0 Robin Gong 2019-10-23 732 dev_err(&pdev->dev, "IRQ %d is not free.\n", irq);
c46712e52a8dd0 Robin Gong 2019-10-23 733
c46712e52a8dd0 Robin Gong 2019-10-23 734 /* Un-mask IRQ Interrupt */
c46712e52a8dd0 Robin Gong 2019-10-23 735 ret = pca9450_reg_write(pca9450, PCA9450_INT1_MSK, 0);
c46712e52a8dd0 Robin Gong 2019-10-23 736 if (ret < 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 737 dev_err(&pdev->dev, "Write 'PCA9450_REG_MIRQ': failed!\n");
c46712e52a8dd0 Robin Gong 2019-10-23 738 ret = -EIO;
c46712e52a8dd0 Robin Gong 2019-10-23 739 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 740 }
c46712e52a8dd0 Robin Gong 2019-10-23 741
c46712e52a8dd0 Robin Gong 2019-10-23 742 return 0;
c46712e52a8dd0 Robin Gong 2019-10-23 743
c46712e52a8dd0 Robin Gong 2019-10-23 744 err:
c46712e52a8dd0 Robin Gong 2019-10-23 745 while (--i >= 0)
c46712e52a8dd0 Robin Gong 2019-10-23 746 regulator_unregister(pmic->rdev[i]);
c46712e52a8dd0 Robin Gong 2019-10-23 747
c46712e52a8dd0 Robin Gong 2019-10-23 748 kfree(pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 749 return err;
c46712e52a8dd0 Robin Gong 2019-10-23 750 }
c46712e52a8dd0 Robin Gong 2019-10-23 751
:::::: The code at line 678 was first introduced by commit
:::::: c46712e52a8dd0ecce6efbd2d2d56919352478a9 MLK-22824-2: regulator: pca9450: add pca9450 regulator driver
:::::: TO: Robin Gong <yibin.gong(a)nxp.com>
:::::: CC: Robin Gong <yibin.gong(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[chrome-os:chromeos-5.4 40/40] drivers/gpu/arm/valhall/mali_kbase_mem.c:839:6: warning: no previous prototype for 'kbase_region_tracker_has_allocs'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 7a06703e9fe67305e21bab21264af3d1d7f89d7a
commit: 7a06703e9fe67305e21bab21264af3d1d7f89d7a [40/40] CHROMIUM: MALI: GPUSWERRATA-1078
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 7a06703e9fe67305e21bab21264af3d1d7f89d7a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/arm/valhall/mali_kbase_mem.c:839:6: warning: no previous prototype for 'kbase_region_tracker_has_allocs' [-Wmissing-prototypes]
839 | bool kbase_region_tracker_has_allocs(struct kbase_context *kctx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/arm/valhall/mali_kbase_defs.h:37,
from drivers/gpu/arm/valhall/mali_kbase.h:57,
from drivers/gpu/arm/valhall/mali_kbase_mem.c:37:
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:625:33: warning: 'base_hw_issues_model_tE2x' defined but not used [-Wunused-const-variable=]
625 | static const enum base_hw_issue base_hw_issues_model_tE2x[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:615:33: warning: 'base_hw_issues_tE2x_r0p0' defined but not used [-Wunused-const-variable=]
615 | static const enum base_hw_issue base_hw_issues_tE2x_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:607:33: warning: 'base_hw_issues_model_tTUx' defined but not used [-Wunused-const-variable=]
607 | static const enum base_hw_issue base_hw_issues_model_tTUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:600:33: warning: 'base_hw_issues_tTUx_r0p0' defined but not used [-Wunused-const-variable=]
600 | static const enum base_hw_issue base_hw_issues_tTUx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:592:33: warning: 'base_hw_issues_model_tVAx' defined but not used [-Wunused-const-variable=]
592 | static const enum base_hw_issue base_hw_issues_model_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:585:33: warning: 'base_hw_issues_tVAx_r0p0' defined but not used [-Wunused-const-variable=]
585 | static const enum base_hw_issue base_hw_issues_tVAx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:577:33: warning: 'base_hw_issues_model_tGRx' defined but not used [-Wunused-const-variable=]
577 | static const enum base_hw_issue base_hw_issues_model_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:570:33: warning: 'base_hw_issues_tGRx_r0p0' defined but not used [-Wunused-const-variable=]
570 | static const enum base_hw_issue base_hw_issues_tGRx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:562:33: warning: 'base_hw_issues_model_tODx' defined but not used [-Wunused-const-variable=]
562 | static const enum base_hw_issue base_hw_issues_model_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:555:33: warning: 'base_hw_issues_tODx_r0p0' defined but not used [-Wunused-const-variable=]
555 | static const enum base_hw_issue base_hw_issues_tODx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:545:33: warning: 'base_hw_issues_model_tDUx' defined but not used [-Wunused-const-variable=]
545 | static const enum base_hw_issue base_hw_issues_model_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:535:33: warning: 'base_hw_issues_tDUx_r0p0' defined but not used [-Wunused-const-variable=]
535 | static const enum base_hw_issue base_hw_issues_tDUx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:522:33: warning: 'base_hw_issues_lBEx_r1p1' defined but not used [-Wunused-const-variable=]
522 | static const enum base_hw_issue base_hw_issues_lBEx_r1p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:508:33: warning: 'base_hw_issues_lBEx_r1p0' defined but not used [-Wunused-const-variable=]
508 | static const enum base_hw_issue base_hw_issues_lBEx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:496:33: warning: 'base_hw_issues_model_tBEx' defined but not used [-Wunused-const-variable=]
496 | static const enum base_hw_issue base_hw_issues_model_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:483:33: warning: 'base_hw_issues_tBEx_r1p1' defined but not used [-Wunused-const-variable=]
483 | static const enum base_hw_issue base_hw_issues_tBEx_r1p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:470:33: warning: 'base_hw_issues_tBEx_r1p0' defined but not used [-Wunused-const-variable=]
470 | static const enum base_hw_issue base_hw_issues_tBEx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:457:33: warning: 'base_hw_issues_tBEx_r0p1' defined but not used [-Wunused-const-variable=]
457 | static const enum base_hw_issue base_hw_issues_tBEx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:443:33: warning: 'base_hw_issues_tBEx_r0p0' defined but not used [-Wunused-const-variable=]
443 | static const enum base_hw_issue base_hw_issues_tBEx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:431:33: warning: 'base_hw_issues_model_tNAx' defined but not used [-Wunused-const-variable=]
431 | static const enum base_hw_issue base_hw_issues_model_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:416:33: warning: 'base_hw_issues_tNAx_r0p1' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_issue base_hw_issues_tNAx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:400:33: warning: 'base_hw_issues_tNAx_r0p0' defined but not used [-Wunused-const-variable=]
400 | static const enum base_hw_issue base_hw_issues_tNAx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:388:33: warning: 'base_hw_issues_model_tTRx' defined but not used [-Wunused-const-variable=]
388 | static const enum base_hw_issue base_hw_issues_model_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:373:33: warning: 'base_hw_issues_tTRx_r0p2' defined but not used [-Wunused-const-variable=]
373 | static const enum base_hw_issue base_hw_issues_tTRx_r0p2[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:357:33: warning: 'base_hw_issues_tTRx_r0p1' defined but not used [-Wunused-const-variable=]
357 | static const enum base_hw_issue base_hw_issues_tTRx_r0p1[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:341:33: warning: 'base_hw_issues_tTRx_r0p0' defined but not used [-Wunused-const-variable=]
341 | static const enum base_hw_issue base_hw_issues_tTRx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:331:33: warning: 'base_hw_issues_model_tGOx' defined but not used [-Wunused-const-variable=]
331 | static const enum base_hw_issue base_hw_issues_model_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:319:33: warning: 'base_hw_issues_tGOx_r1p0' defined but not used [-Wunused-const-variable=]
319 | static const enum base_hw_issue base_hw_issues_tGOx_r1p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:307:33: warning: 'base_hw_issues_tGOx_r0p0' defined but not used [-Wunused-const-variable=]
307 | static const enum base_hw_issue base_hw_issues_tGOx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:297:33: warning: 'base_hw_issues_model_tNOx' defined but not used [-Wunused-const-variable=]
297 | static const enum base_hw_issue base_hw_issues_model_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:285:33: warning: 'base_hw_issues_tNOx_r0p0' defined but not used [-Wunused-const-variable=]
285 | static const enum base_hw_issue base_hw_issues_tNOx_r0p0[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/valhall/mali_base_hwconfig_issues.h:275:33: warning: 'base_hw_issues_model_tDVx' defined but not used [-Wunused-const-variable=]
275 | static const enum base_hw_issue base_hw_issues_model_tDVx[] = {
vim +/kbase_region_tracker_has_allocs +839 drivers/gpu/arm/valhall/mali_kbase_mem.c
822
823 /**
824 * Determine if any allocations have been made on a context's region tracker
825 * @kctx: KBase context
826 *
827 * Check the context to determine if any allocations have been made yet from
828 * any of its zones. This check should be done before resizing a zone, e.g. to
829 * make space to add a second zone.
830 *
831 * Whilst a zone without allocations can be resized whilst other zones have
832 * allocations, we still check all of @kctx 's zones anyway: this is a stronger
833 * guarantee and should be adhered to when creating new zones anyway.
834 *
835 * Allocations from kbdev zones are not counted.
836 *
837 * Return: true if any allocs exist on any zone, false otherwise
838 */
> 839 bool kbase_region_tracker_has_allocs(struct kbase_context *kctx)
840 {
841 unsigned int zone_idx;
842
843 lockdep_assert_held(&kctx->reg_lock);
844
845 for (zone_idx = 0; zone_idx < KBASE_REG_ZONE_MAX; ++zone_idx) {
846 struct kbase_reg_zone *zone;
847 struct kbase_va_region *reg;
848 u64 zone_base_addr;
849 unsigned long zone_bits = KBASE_REG_ZONE(zone_idx);
850 unsigned long reg_zone;
851
852 zone = kbase_ctx_reg_zone_get(kctx, zone_bits);
853 zone_base_addr = zone->base_pfn << PAGE_SHIFT;
854
855 reg = kbase_region_tracker_find_region_base_address(
856 kctx, zone_base_addr);
857
858 if (!zone->va_size_pages) {
859 WARN(reg,
860 "Should not have found a region that starts at 0x%.16llx for zone 0x%lx",
861 (unsigned long long)zone_base_addr, zone_bits);
862 continue;
863 }
864
865 if (WARN(!reg,
866 "There should always be a region that starts at 0x%.16llx for zone 0x%lx, couldn't find it",
867 (unsigned long long)zone_base_addr, zone_bits))
868 return true; /* Safest return value */
869
870 reg_zone = reg->flags & KBASE_REG_ZONE_MASK;
871 if (WARN(reg_zone != zone_bits,
872 "The region that starts at 0x%.16llx should be in zone 0x%lx but was found in the wrong zone 0x%lx",
873 (unsigned long long)zone_base_addr, zone_bits,
874 reg_zone))
875 return true; /* Safest return value */
876
877 /* Unless the region is completely free, of the same size as
878 * the original zone, then it has allocs
879 */
880 if ((!(reg->flags & KBASE_REG_FREE)) ||
881 (reg->nr_pages != zone->va_size_pages))
882 return true;
883 }
884
885 /* All zones are the same size as originally made, so there are no
886 * allocs
887 */
888 return false;
889 }
890
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
net/wireless/pmsr.c:164:12: warning: stack frame size of 1208 bytes in function 'pmsr_parse_peer'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 7e3ce05e7f650371061d0b9eec1e1cf74ed6fca0 netlink: add tracepoint at NL_SET_ERR_MSG
date: 3 months ago
config: mips-randconfig-r015-20210519 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8e93d10633d751a3e9169bf9fa68326925ffa097)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7e3ce05e7f650371061d0b9eec1e1cf74ed6fca0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/wireless/pmsr.c:164:12: warning: stack frame size of 1208 bytes in function 'pmsr_parse_peer' [-Wframe-larger-than=]
static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
^
1 warning generated.
vim +/pmsr_parse_peer +164 net/wireless/pmsr.c
9bb7e0f24e7e7d Johannes Berg 2018-09-10 163
9bb7e0f24e7e7d Johannes Berg 2018-09-10 @164 static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 165 struct nlattr *peer,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 166 struct cfg80211_pmsr_request_peer *out,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 167 struct genl_info *info)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 168 {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 169 struct nlattr *tb[NL80211_PMSR_PEER_ATTR_MAX + 1];
9bb7e0f24e7e7d Johannes Berg 2018-09-10 170 struct nlattr *req[NL80211_PMSR_REQ_ATTR_MAX + 1];
9bb7e0f24e7e7d Johannes Berg 2018-09-10 171 struct nlattr *treq;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 172 int err, rem;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 173
9bb7e0f24e7e7d Johannes Berg 2018-09-10 174 /* no validation needed - was already done via nested policy */
8cb081746c031f Johannes Berg 2019-04-26 175 nla_parse_nested_deprecated(tb, NL80211_PMSR_PEER_ATTR_MAX, peer,
8cb081746c031f Johannes Berg 2019-04-26 176 NULL, NULL);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 177
9bb7e0f24e7e7d Johannes Berg 2018-09-10 178 if (!tb[NL80211_PMSR_PEER_ATTR_ADDR] ||
9bb7e0f24e7e7d Johannes Berg 2018-09-10 179 !tb[NL80211_PMSR_PEER_ATTR_CHAN] ||
9bb7e0f24e7e7d Johannes Berg 2018-09-10 180 !tb[NL80211_PMSR_PEER_ATTR_REQ]) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 181 NL_SET_ERR_MSG_ATTR(info->extack, peer,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 182 "insufficient peer data");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 183 return -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 184 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 185
9bb7e0f24e7e7d Johannes Berg 2018-09-10 186 memcpy(out->addr, nla_data(tb[NL80211_PMSR_PEER_ATTR_ADDR]), ETH_ALEN);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 187
9bb7e0f24e7e7d Johannes Berg 2018-09-10 188 /* reuse info->attrs */
9bb7e0f24e7e7d Johannes Berg 2018-09-10 189 memset(info->attrs, 0, sizeof(*info->attrs) * (NL80211_ATTR_MAX + 1));
8cb081746c031f Johannes Berg 2019-04-26 190 err = nla_parse_nested_deprecated(info->attrs, NL80211_ATTR_MAX,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 191 tb[NL80211_PMSR_PEER_ATTR_CHAN],
d15da2a2e81367 Johannes Berg 2020-04-30 192 NULL, info->extack);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 193 if (err)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 194 return err;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 195
9bb7e0f24e7e7d Johannes Berg 2018-09-10 196 err = nl80211_parse_chandef(rdev, info, &out->chandef);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 197 if (err)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 198 return err;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 199
9bb7e0f24e7e7d Johannes Berg 2018-09-10 200 /* no validation needed - was already done via nested policy */
8cb081746c031f Johannes Berg 2019-04-26 201 nla_parse_nested_deprecated(req, NL80211_PMSR_REQ_ATTR_MAX,
8cb081746c031f Johannes Berg 2019-04-26 202 tb[NL80211_PMSR_PEER_ATTR_REQ], NULL,
8cb081746c031f Johannes Berg 2019-04-26 203 NULL);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 204
9bb7e0f24e7e7d Johannes Berg 2018-09-10 205 if (!req[NL80211_PMSR_REQ_ATTR_DATA]) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 206 NL_SET_ERR_MSG_ATTR(info->extack,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 207 tb[NL80211_PMSR_PEER_ATTR_REQ],
9bb7e0f24e7e7d Johannes Berg 2018-09-10 208 "missing request type/data");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 209 return -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 210 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 211
9bb7e0f24e7e7d Johannes Berg 2018-09-10 212 if (req[NL80211_PMSR_REQ_ATTR_GET_AP_TSF])
9bb7e0f24e7e7d Johannes Berg 2018-09-10 213 out->report_ap_tsf = true;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 214
9bb7e0f24e7e7d Johannes Berg 2018-09-10 215 if (out->report_ap_tsf && !rdev->wiphy.pmsr_capa->report_ap_tsf) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 216 NL_SET_ERR_MSG_ATTR(info->extack,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 217 req[NL80211_PMSR_REQ_ATTR_GET_AP_TSF],
9bb7e0f24e7e7d Johannes Berg 2018-09-10 218 "reporting AP TSF is not supported");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 219 return -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 220 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 221
9bb7e0f24e7e7d Johannes Berg 2018-09-10 222 nla_for_each_nested(treq, req[NL80211_PMSR_REQ_ATTR_DATA], rem) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 223 switch (nla_type(treq)) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 224 case NL80211_PMSR_TYPE_FTM:
9bb7e0f24e7e7d Johannes Berg 2018-09-10 225 err = pmsr_parse_ftm(rdev, treq, out, info);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 226 break;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 227 default:
9bb7e0f24e7e7d Johannes Berg 2018-09-10 228 NL_SET_ERR_MSG_ATTR(info->extack, treq,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 229 "unsupported measurement type");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 230 err = -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 231 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 232 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 233
9bb7e0f24e7e7d Johannes Berg 2018-09-10 234 if (err)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 235 return err;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 236
9bb7e0f24e7e7d Johannes Berg 2018-09-10 237 return 0;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 238 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 239
:::::: The code at line 164 was first introduced by commit
:::::: 9bb7e0f24e7e7d00daa1219b14539e2e602649b2 cfg80211: add peer measurement with FTM initiator API
:::::: TO: Johannes Berg <johannes.berg(a)intel.com>
:::::: CC: Johannes Berg <johannes.berg(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arm-platforms:irq/domain_cleanup 25/25] drivers/irqchip/irq-al-fic.c:114:15: warning: Unused variable: irq [unusedVariable]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: dee94333f76d0bd7b6c8302e377654b6e103b71b
commit: dee94333f76d0bd7b6c8302e377654b6e103b71b [25/25] irqchip: Bulk conversion to generic_handle_domain_irq()
compiler: alpha-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/irqchip/irq-al-fic.c:114:15: warning: Unused variable: irq [unusedVariable]
unsigned int irq;
^
vim +114 drivers/irqchip/irq-al-fic.c
1eb77c3bcdb70f Talel Shenhar 2019-06-10 106
1eb77c3bcdb70f Talel Shenhar 2019-06-10 107 static void al_fic_irq_handler(struct irq_desc *desc)
1eb77c3bcdb70f Talel Shenhar 2019-06-10 108 {
1eb77c3bcdb70f Talel Shenhar 2019-06-10 109 struct al_fic *fic = irq_desc_get_handler_data(desc);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 110 struct irq_domain *domain = fic->domain;
1eb77c3bcdb70f Talel Shenhar 2019-06-10 111 struct irq_chip *irqchip = irq_desc_get_chip(desc);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 112 struct irq_chip_generic *gc = irq_get_domain_generic_chip(domain, 0);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 113 unsigned long pending;
1eb77c3bcdb70f Talel Shenhar 2019-06-10 @114 unsigned int irq;
1eb77c3bcdb70f Talel Shenhar 2019-06-10 115 u32 hwirq;
1eb77c3bcdb70f Talel Shenhar 2019-06-10 116
1eb77c3bcdb70f Talel Shenhar 2019-06-10 117 chained_irq_enter(irqchip, desc);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 118
1eb77c3bcdb70f Talel Shenhar 2019-06-10 119 pending = readl_relaxed(fic->base + AL_FIC_CAUSE);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 120 pending &= ~gc->mask_cache;
1eb77c3bcdb70f Talel Shenhar 2019-06-10 121
dee94333f76d0b Marc Zyngier 2021-05-04 122 for_each_set_bit(hwirq, &pending, NR_FIC_IRQS)
dee94333f76d0b Marc Zyngier 2021-05-04 123 generic_handle_domain_irq(domain, hwirq);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 124
1eb77c3bcdb70f Talel Shenhar 2019-06-10 125 chained_irq_exit(irqchip, desc);
1eb77c3bcdb70f Talel Shenhar 2019-06-10 126 }
1eb77c3bcdb70f Talel Shenhar 2019-06-10 127
:::::: The code at line 114 was first introduced by commit
:::::: 1eb77c3bcdb70f2501f419b3da45b19acaf01072 irqchip/al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver
:::::: TO: Talel Shenhar <talel(a)amazon.com>
:::::: CC: Marc Zyngier <marc.zyngier(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arm-platforms:irq/domain_cleanup 7/39] arch/mips/sgi-ip30/ip30-irq.c:222:2: error: implicit declaration of function 'irq_domain_set_info'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: 5019b17f095613b0b187d1cdcaa798347de62033
commit: e02a045e1bf414960f6b563a638c88ac6c96e490 [7/39] MIPS: Do not include linux/irqdomain.h from asm/irq.h
config: mips-randconfig-r003-20210519 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/domain_cleanup
git checkout e02a045e1bf414960f6b563a638c88ac6c96e490
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
arch/mips/sgi-ip30/ip30-irq.c: In function 'ip30_normal_irq':
arch/mips/sgi-ip30/ip30-irq.c:132:9: error: implicit declaration of function 'irq_linear_revmap' [-Werror=implicit-function-declaration]
132 | irq = irq_linear_revmap(domain, __ffs(pend));
| ^~~~~~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-irq.c: In function 'heart_domain_alloc':
>> arch/mips/sgi-ip30/ip30-irq.c:222:2: error: implicit declaration of function 'irq_domain_set_info' [-Werror=implicit-function-declaration]
222 | irq_domain_set_info(domain, virq, hwirq, &heart_irq_chip, hd,
| ^~~~~~~~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-irq.c: In function 'heart_domain_free':
>> arch/mips/sgi-ip30/ip30-irq.c:236:9: error: implicit declaration of function 'irq_domain_get_irq_data'; did you mean 'irq_desc_get_irq_data'? [-Werror=implicit-function-declaration]
236 | irqd = irq_domain_get_irq_data(domain, virq);
| ^~~~~~~~~~~~~~~~~~~~~~~
| irq_desc_get_irq_data
>> arch/mips/sgi-ip30/ip30-irq.c:236:7: warning: assignment to 'struct irq_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
236 | irqd = irq_domain_get_irq_data(domain, virq);
| ^
arch/mips/sgi-ip30/ip30-irq.c: At top level:
>> arch/mips/sgi-ip30/ip30-irq.c:243:21: error: variable 'heart_domain_ops' has initializer but incomplete type
243 | static const struct irq_domain_ops heart_domain_ops = {
| ^~~~~~~~~~~~~~
>> arch/mips/sgi-ip30/ip30-irq.c:244:3: error: 'const struct irq_domain_ops' has no member named 'alloc'
244 | .alloc = heart_domain_alloc,
| ^~~~~
>> arch/mips/sgi-ip30/ip30-irq.c:244:11: warning: excess elements in struct initializer
244 | .alloc = heart_domain_alloc,
| ^~~~~~~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-irq.c:244:11: note: (near initialization for 'heart_domain_ops')
>> arch/mips/sgi-ip30/ip30-irq.c:245:3: error: 'const struct irq_domain_ops' has no member named 'free'
245 | .free = heart_domain_free,
| ^~~~
arch/mips/sgi-ip30/ip30-irq.c:245:11: warning: excess elements in struct initializer
245 | .free = heart_domain_free,
| ^~~~~~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-irq.c:245:11: note: (near initialization for 'heart_domain_ops')
arch/mips/sgi-ip30/ip30-irq.c: In function 'arch_init_irq':
>> arch/mips/sgi-ip30/ip30-irq.c:307:7: error: implicit declaration of function 'irq_domain_alloc_named_fwnode' [-Werror=implicit-function-declaration]
307 | fn = irq_domain_alloc_named_fwnode("HEART");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/sgi-ip30/ip30-irq.c:307:5: warning: assignment to 'struct fwnode_handle *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
307 | fn = irq_domain_alloc_named_fwnode("HEART");
| ^
>> arch/mips/sgi-ip30/ip30-irq.c:311:11: error: implicit declaration of function 'irq_domain_create_linear' [-Werror=implicit-function-declaration]
311 | domain = irq_domain_create_linear(fn, HEART_NUM_IRQS,
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/sgi-ip30/ip30-irq.c:311:9: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
311 | domain = irq_domain_create_linear(fn, HEART_NUM_IRQS,
| ^
>> arch/mips/sgi-ip30/ip30-irq.c:317:2: error: implicit declaration of function 'irq_set_default_host' [-Werror=implicit-function-declaration]
317 | irq_set_default_host(domain);
| ^~~~~~~~~~~~~~~~~~~~
arch/mips/sgi-ip30/ip30-irq.c: At top level:
>> arch/mips/sgi-ip30/ip30-irq.c:243:36: error: storage size of 'heart_domain_ops' isn't known
243 | static const struct irq_domain_ops heart_domain_ops = {
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
arch/mips/pci/pci-xtalk-bridge.c: In function 'bridge_domain_alloc':
>> arch/mips/pci/pci-xtalk-bridge.c:347:8: error: implicit declaration of function 'irq_domain_alloc_irqs_parent' [-Werror=implicit-function-declaration]
347 | ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/pci/pci-xtalk-bridge.c:351:3: error: implicit declaration of function 'irq_domain_set_info' [-Werror=implicit-function-declaration]
351 | irq_domain_set_info(domain, virq, info->pin, &bridge_irq_chip,
| ^~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c: In function 'bridge_domain_free':
>> arch/mips/pci/pci-xtalk-bridge.c:363:26: error: implicit declaration of function 'irq_domain_get_irq_data'; did you mean 'irq_desc_get_irq_data'? [-Werror=implicit-function-declaration]
363 | struct irq_data *irqd = irq_domain_get_irq_data(domain, virq);
| ^~~~~~~~~~~~~~~~~~~~~~~
| irq_desc_get_irq_data
>> arch/mips/pci/pci-xtalk-bridge.c:363:26: warning: initialization of 'struct irq_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> arch/mips/pci/pci-xtalk-bridge.c:369:2: error: implicit declaration of function 'irq_domain_free_irqs_top' [-Werror=implicit-function-declaration]
369 | irq_domain_free_irqs_top(domain, virq, nr_irqs);
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c: At top level:
>> arch/mips/pci/pci-xtalk-bridge.c:418:21: error: variable 'bridge_domain_ops' has initializer but incomplete type
418 | static const struct irq_domain_ops bridge_domain_ops = {
| ^~~~~~~~~~~~~~
>> arch/mips/pci/pci-xtalk-bridge.c:419:3: error: 'const struct irq_domain_ops' has no member named 'alloc'
419 | .alloc = bridge_domain_alloc,
| ^~~~~
>> arch/mips/pci/pci-xtalk-bridge.c:419:16: warning: excess elements in struct initializer
419 | .alloc = bridge_domain_alloc,
| ^~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:419:16: note: (near initialization for 'bridge_domain_ops')
>> arch/mips/pci/pci-xtalk-bridge.c:420:3: error: 'const struct irq_domain_ops' has no member named 'free'
420 | .free = bridge_domain_free,
| ^~~~
arch/mips/pci/pci-xtalk-bridge.c:420:16: warning: excess elements in struct initializer
420 | .free = bridge_domain_free,
| ^~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:420:16: note: (near initialization for 'bridge_domain_ops')
>> arch/mips/pci/pci-xtalk-bridge.c:421:3: error: 'const struct irq_domain_ops' has no member named 'activate'
421 | .activate = bridge_domain_activate,
| ^~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:421:16: warning: excess elements in struct initializer
421 | .activate = bridge_domain_activate,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:421:16: note: (near initialization for 'bridge_domain_ops')
>> arch/mips/pci/pci-xtalk-bridge.c:422:3: error: 'const struct irq_domain_ops' has no member named 'deactivate'
422 | .deactivate = bridge_domain_deactivate
| ^~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:422:16: warning: excess elements in struct initializer
422 | .deactivate = bridge_domain_deactivate
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:422:16: note: (near initialization for 'bridge_domain_ops')
arch/mips/pci/pci-xtalk-bridge.c: In function 'bridge_map_irq':
>> arch/mips/pci/pci-xtalk-bridge.c:457:9: error: implicit declaration of function 'irq_domain_alloc_irqs' [-Werror=implicit-function-declaration]
457 | irq = irq_domain_alloc_irqs(bc->domain, 1, bc->nasid, &info);
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c: In function 'bridge_probe':
>> arch/mips/pci/pci-xtalk-bridge.c:622:11: error: implicit declaration of function 'irq_get_default_host' [-Werror=implicit-function-declaration]
622 | parent = irq_get_default_host();
| ^~~~~~~~~~~~~~~~~~~~
>> arch/mips/pci/pci-xtalk-bridge.c:622:9: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
622 | parent = irq_get_default_host();
| ^
>> arch/mips/pci/pci-xtalk-bridge.c:625:7: error: implicit declaration of function 'irq_domain_alloc_named_fwnode' [-Werror=implicit-function-declaration]
625 | fn = irq_domain_alloc_named_fwnode("BRIDGE");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/pci/pci-xtalk-bridge.c:625:5: warning: assignment to 'struct fwnode_handle *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
625 | fn = irq_domain_alloc_named_fwnode("BRIDGE");
| ^
>> arch/mips/pci/pci-xtalk-bridge.c:628:11: error: implicit declaration of function 'irq_domain_create_hierarchy' [-Werror=implicit-function-declaration]
628 | domain = irq_domain_create_hierarchy(parent, 0, 8, fn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c:628:9: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
628 | domain = irq_domain_create_hierarchy(parent, 0, 8, fn,
| ^
>> arch/mips/pci/pci-xtalk-bridge.c:631:3: error: implicit declaration of function 'irq_domain_free_fwnode' [-Werror=implicit-function-declaration]
631 | irq_domain_free_fwnode(fn);
| ^~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/pci/pci-xtalk-bridge.c:730:2: error: implicit declaration of function 'irq_domain_remove' [-Werror=implicit-function-declaration]
730 | irq_domain_remove(domain);
| ^~~~~~~~~~~~~~~~~
arch/mips/pci/pci-xtalk-bridge.c: In function 'bridge_remove':
>> arch/mips/pci/pci-xtalk-bridge.c:739:39: error: dereferencing pointer to incomplete type 'struct irq_domain'
739 | struct fwnode_handle *fn = bc->domain->fwnode;
| ^~
arch/mips/pci/pci-xtalk-bridge.c: At top level:
arch/mips/pci/pci-xtalk-bridge.c:418:36: error: storage size of 'bridge_domain_ops' isn't known
418 | static const struct irq_domain_ops bridge_domain_ops = {
| ^~~~~~~~~~~~~~~~~
In file included from arch/mips/include/asm/pci/bridge.h:17,
from arch/mips/pci/pci-xtalk-bridge.c:17:
arch/mips/include/asm/xtalk/xwidget.h:124:46: warning: 'widget_idents' defined but not used [-Wunused-const-variable=]
124 | static const struct widget_ident __initconst widget_idents[] = {
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/irq_domain_set_info +222 arch/mips/sgi-ip30/ip30-irq.c
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 95
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 96 static void ip30_normal_irq(struct irq_desc *desc)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 97 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 98 int cpu = smp_processor_id();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 99 struct irq_domain *domain;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 100 u64 pend, mask;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 101 int irq;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 102
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 103 pend = heart_read(&heart_regs->isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 104 mask = (heart_read(&heart_regs->imr[cpu]) &
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 105 (HEART_L0_INT_MASK | HEART_L1_INT_MASK | HEART_L2_INT_MASK));
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 106
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 107 pend &= mask;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 108 if (unlikely(!pend))
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 109 return;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 110
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 111 #ifdef CONFIG_SMP
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 112 if (pend & BIT_ULL(HEART_L2_INT_RESCHED_CPU_0)) {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 113 heart_write(BIT_ULL(HEART_L2_INT_RESCHED_CPU_0),
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 114 &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 115 scheduler_ipi();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 116 } else if (pend & BIT_ULL(HEART_L2_INT_RESCHED_CPU_1)) {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 117 heart_write(BIT_ULL(HEART_L2_INT_RESCHED_CPU_1),
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 118 &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 119 scheduler_ipi();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 120 } else if (pend & BIT_ULL(HEART_L2_INT_CALL_CPU_0)) {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 121 heart_write(BIT_ULL(HEART_L2_INT_CALL_CPU_0),
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 122 &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 123 generic_smp_call_function_interrupt();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 124 } else if (pend & BIT_ULL(HEART_L2_INT_CALL_CPU_1)) {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 125 heart_write(BIT_ULL(HEART_L2_INT_CALL_CPU_1),
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 126 &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 127 generic_smp_call_function_interrupt();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 128 } else
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 129 #endif
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 130 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 131 domain = irq_desc_get_handler_data(desc);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @132 irq = irq_linear_revmap(domain, __ffs(pend));
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 133 if (irq)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 134 generic_handle_irq(irq);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 135 else
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 136 spurious_interrupt();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 137 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 138 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 139
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 140 static void ip30_ack_heart_irq(struct irq_data *d)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 141 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 142 heart_write(BIT_ULL(d->hwirq), &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 143 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 144
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 145 static void ip30_mask_heart_irq(struct irq_data *d)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 146 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 147 struct heart_irq_data *hd = irq_data_get_irq_chip_data(d);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 148 unsigned long *mask = &per_cpu(irq_enable_mask, hd->cpu);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 149
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 150 clear_bit(d->hwirq, mask);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 151 heart_write(*mask, &heart_regs->imr[hd->cpu]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 152 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 153
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 154 static void ip30_mask_and_ack_heart_irq(struct irq_data *d)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 155 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 156 struct heart_irq_data *hd = irq_data_get_irq_chip_data(d);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 157 unsigned long *mask = &per_cpu(irq_enable_mask, hd->cpu);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 158
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 159 clear_bit(d->hwirq, mask);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 160 heart_write(*mask, &heart_regs->imr[hd->cpu]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 161 heart_write(BIT_ULL(d->hwirq), &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 162 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 163
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 164 static void ip30_unmask_heart_irq(struct irq_data *d)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 165 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 166 struct heart_irq_data *hd = irq_data_get_irq_chip_data(d);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 167 unsigned long *mask = &per_cpu(irq_enable_mask, hd->cpu);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 168
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 169 set_bit(d->hwirq, mask);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 170 heart_write(*mask, &heart_regs->imr[hd->cpu]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 171 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 172
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 173 static int ip30_set_heart_irq_affinity(struct irq_data *d,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 174 const struct cpumask *mask, bool force)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 175 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 176 struct heart_irq_data *hd = irq_data_get_irq_chip_data(d);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 177
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 178 if (!hd)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 179 return -EINVAL;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 180
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 181 if (irqd_is_started(d))
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 182 ip30_mask_and_ack_heart_irq(d);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 183
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 184 hd->cpu = cpumask_first_and(mask, cpu_online_mask);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 185
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 186 if (irqd_is_started(d))
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 187 ip30_unmask_heart_irq(d);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 188
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 189 irq_data_update_effective_affinity(d, cpumask_of(hd->cpu));
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 190
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 191 return 0;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 192 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 193
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 194 static struct irq_chip heart_irq_chip = {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 195 .name = "HEART",
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 196 .irq_ack = ip30_ack_heart_irq,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 197 .irq_mask = ip30_mask_heart_irq,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 198 .irq_mask_ack = ip30_mask_and_ack_heart_irq,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 199 .irq_unmask = ip30_unmask_heart_irq,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 200 .irq_set_affinity = ip30_set_heart_irq_affinity,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 201 };
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 202
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 203 static int heart_domain_alloc(struct irq_domain *domain, unsigned int virq,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 204 unsigned int nr_irqs, void *arg)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 205 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 206 struct irq_alloc_info *info = arg;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 207 struct heart_irq_data *hd;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 208 int hwirq;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 209
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 210 if (nr_irqs > 1 || !info)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 211 return -EINVAL;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 212
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 213 hd = kzalloc(sizeof(*hd), GFP_KERNEL);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 214 if (!hd)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 215 return -ENOMEM;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 216
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 217 hwirq = heart_alloc_int();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 218 if (hwirq < 0) {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 219 kfree(hd);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 220 return -EAGAIN;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 221 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @222 irq_domain_set_info(domain, virq, hwirq, &heart_irq_chip, hd,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 223 handle_level_irq, NULL, NULL);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 224
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 225 return 0;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 226 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 227
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 228 static void heart_domain_free(struct irq_domain *domain,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 229 unsigned int virq, unsigned int nr_irqs)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 230 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 231 struct irq_data *irqd;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 232
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 233 if (nr_irqs > 1)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 234 return;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 235
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @236 irqd = irq_domain_get_irq_data(domain, virq);
c0e79fd89749b0 Thomas Bogendoerfer 2020-01-22 237 if (irqd) {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 238 clear_bit(irqd->hwirq, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 239 kfree(irqd->chip_data);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 240 }
c0e79fd89749b0 Thomas Bogendoerfer 2020-01-22 241 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 242
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @243 static const struct irq_domain_ops heart_domain_ops = {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @244 .alloc = heart_domain_alloc,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @245 .free = heart_domain_free,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 246 };
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 247
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 248 void __init ip30_install_ipi(void)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 249 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 250 int cpu = smp_processor_id();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 251 unsigned long *mask = &per_cpu(irq_enable_mask, cpu);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 252
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 253 set_bit(HEART_L2_INT_RESCHED_CPU_0 + cpu, mask);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 254 heart_write(BIT_ULL(HEART_L2_INT_RESCHED_CPU_0 + cpu),
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 255 &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 256 set_bit(HEART_L2_INT_CALL_CPU_0 + cpu, mask);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 257 heart_write(BIT_ULL(HEART_L2_INT_CALL_CPU_0 + cpu),
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 258 &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 259
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 260 heart_write(*mask, &heart_regs->imr[cpu]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 261 }
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 262
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 263 void __init arch_init_irq(void)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 264 {
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 265 struct irq_domain *domain;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 266 struct fwnode_handle *fn;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 267 unsigned long *mask;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 268 int i;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 269
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 270 mips_cpu_irq_init();
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 271
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 272 /* Mask all IRQs. */
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 273 heart_write(HEART_CLR_ALL_MASK, &heart_regs->imr[0]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 274 heart_write(HEART_CLR_ALL_MASK, &heart_regs->imr[1]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 275 heart_write(HEART_CLR_ALL_MASK, &heart_regs->imr[2]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 276 heart_write(HEART_CLR_ALL_MASK, &heart_regs->imr[3]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 277
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 278 /* Ack everything. */
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 279 heart_write(HEART_ACK_ALL_MASK, &heart_regs->clear_isr);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 280
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 281 /* Enable specific HEART error IRQs for each CPU. */
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 282 mask = &per_cpu(irq_enable_mask, 0);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 283 *mask |= HEART_CPU0_ERR_MASK;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 284 heart_write(*mask, &heart_regs->imr[0]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 285 mask = &per_cpu(irq_enable_mask, 1);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 286 *mask |= HEART_CPU1_ERR_MASK;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 287 heart_write(*mask, &heart_regs->imr[1]);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 288
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 289 /*
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 290 * Some HEART bits are reserved by hardware or by software convention.
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 291 * Mark these as reserved right away so they won't be accidentally
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 292 * used later.
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 293 */
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 294 set_bit(HEART_L0_INT_GENERIC, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 295 set_bit(HEART_L0_INT_FLOW_CTRL_HWTR_0, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 296 set_bit(HEART_L0_INT_FLOW_CTRL_HWTR_1, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 297 set_bit(HEART_L2_INT_RESCHED_CPU_0, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 298 set_bit(HEART_L2_INT_RESCHED_CPU_1, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 299 set_bit(HEART_L2_INT_CALL_CPU_0, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 300 set_bit(HEART_L2_INT_CALL_CPU_1, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 301 set_bit(HEART_L3_INT_TIMER, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 302
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 303 /* Reserve the error interrupts (#51 to #63). */
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 304 for (i = HEART_L4_INT_XWID_ERR_9; i <= HEART_L4_INT_HEART_EXCP; i++)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 305 set_bit(i, heart_irq_map);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 306
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @307 fn = irq_domain_alloc_named_fwnode("HEART");
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 308 WARN_ON(fn == NULL);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 309 if (!fn)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 310 return;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @311 domain = irq_domain_create_linear(fn, HEART_NUM_IRQS,
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 312 &heart_domain_ops, NULL);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 313 WARN_ON(domain == NULL);
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 314 if (!domain)
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 315 return;
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 316
7505576d1c1ac0 Thomas Bogendoerfer 2019-10-24 @317 irq_set_default_host(domain);
:::::: The code at line 222 was first introduced by commit
:::::: 7505576d1c1ac0cfe85fdf90999433dd8b673012 MIPS: add support for SGI Octane (IP30)
:::::: TO: Thomas Bogendoerfer <tbogendoerfer(a)suse.de>
:::::: CC: Paul Burton <paulburton(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[luto:x86/kentry 2/11] kernel/sched/core.c:5476:85: error: too many arguments provided to function-like macro invocation
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/kentry
head: fb951a475a1cd1e5e280ee8b4ce64a6a68c77b64
commit: dcdc171ab7d985c6e6eea0c4ccefb5785250ff8e [2/11] kentry: Rename irqentry to kentry
config: x86_64-randconfig-a003-20210519 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ceb1ac9812cb0972cfa34cecc5e5704ae2a22063)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/kentry
git checkout dcdc171ab7d985c6e6eea0c4ccefb5785250ff8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
kernel/sched/core.c:2850:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel/sched/core.c:2850:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
>> kernel/sched/core.c:5476:85: error: too many arguments provided to function-like macro invocation
static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
^
include/linux/static_call.h:119:9: note: macro 'static_call_update' defined here
#define static_call_update(name, func) \
^
>> kernel/sched/core.c:5476:3: error: use of undeclared identifier 'static_call_update'; did you mean '__static_call_update'?
static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
^~~~~~~~~~~~~~~~~~
__static_call_update
include/linux/static_call.h:144:13: note: '__static_call_update' declared here
extern void __static_call_update(struct static_call_key *key, void *tramp, void *func);
^
kernel/sched/core.c:5476:3: warning: expression result unused [-Wunused-value]
static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
^~~~~~~~~~~~~~~~~~
kernel/sched/core.c:5485:85: error: too many arguments provided to function-like macro invocation
static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
^
include/linux/static_call.h:119:9: note: macro 'static_call_update' defined here
#define static_call_update(name, func) \
^
kernel/sched/core.c:5485:3: error: use of undeclared identifier 'static_call_update'; did you mean '__static_call_update'?
static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
^~~~~~~~~~~~~~~~~~
__static_call_update
include/linux/static_call.h:144:13: note: '__static_call_update' declared here
extern void __static_call_update(struct static_call_key *key, void *tramp, void *func);
^
kernel/sched/core.c:5485:3: warning: expression result unused [-Wunused-value]
static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
^~~~~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
vim +5476 kernel/sched/core.c
5457
5458 void sched_dynamic_update(int mode)
5459 {
5460 /*
5461 * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in
5462 * the ZERO state, which is invalid.
5463 */
5464 static_call_update(cond_resched, __cond_resched);
5465 static_call_update(might_resched, __cond_resched);
5466 static_call_update(preempt_schedule, __preempt_schedule_func);
5467 static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func);
5468 static_call_update(kentry_exit_cond_resched, kentry_exit_cond_resched);
5469
5470 switch (mode) {
5471 case preempt_dynamic_none:
5472 static_call_update(cond_resched, __cond_resched);
5473 static_call_update(might_resched, (void *)&__static_call_return0);
5474 static_call_update(preempt_schedule, NULL);
5475 static_call_update(preempt_schedule_notrace, NULL);
> 5476 static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
5477 pr_info("Dynamic Preempt: none\n");
5478 break;
5479
5480 case preempt_dynamic_voluntary:
5481 static_call_update(cond_resched, __cond_resched);
5482 static_call_update(might_resched, __cond_resched);
5483 static_call_update(preempt_schedule, NULL);
5484 static_call_update(preempt_schedule_notrace, NULL);
5485 static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
5486 pr_info("Dynamic Preempt: voluntary\n");
5487 break;
5488
5489 case preempt_dynamic_full:
5490 static_call_update(cond_resched, (void *)&__static_call_return0);
5491 static_call_update(might_resched, (void *)&__static_call_return0);
5492 static_call_update(preempt_schedule, __preempt_schedule_func);
5493 static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func);
5494 static_call_update(kentry_exit_cond_resched, kentry_exit_cond_resched);
5495 pr_info("Dynamic Preempt: full\n");
5496 break;
5497 }
5498
5499 preempt_dynamic_mode = mode;
5500 }
5501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[pinchartl-media:imx8mp/for-marek 257/277] drivers/staging/media/imx/imx8-isi-pipe.c:1307:24: warning: variable 'f' set but not used
by kernel test robot
tree: git://linuxtv.org/pinchartl/media.git imx8mp/for-marek
head: dd5edf150f9888ae51868655558ca393131a52a1
commit: 07054221290d22f8f02e0c5c5f6d4ef8f916fd63 [257/277] staging: media: imx: isi: Drop legacy format fields
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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
git remote add pinchartl-media git://linuxtv.org/pinchartl/media.git
git fetch --no-tags pinchartl-media imx8mp/for-marek
git checkout 07054221290d22f8f02e0c5c5f6d4ef8f916fd63
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/staging/media/imx/imx8-isi-pipe.c: In function 'mxc_isi_pipe_set_selection':
>> drivers/staging/media/imx/imx8-isi-pipe.c:1307:24: warning: variable 'f' set but not used [-Wunused-but-set-variable]
1307 | struct mxc_isi_frame *f = &pipe->formats[MXC_ISI_SD_PAD_SINK];
| ^
vim +/f +1307 drivers/staging/media/imx/imx8-isi-pipe.c
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1301
9fdcc0f46347df drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1302 static int mxc_isi_pipe_set_selection(struct v4l2_subdev *sd,
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1303 struct v4l2_subdev_pad_config *cfg,
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1304 struct v4l2_subdev_selection *sel)
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1305 {
7180b8d137a989 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1306 struct mxc_isi_pipe *pipe = v4l2_get_subdevdata(sd);
c24b3c44b1d2c7 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 @1307 struct mxc_isi_frame *f = &pipe->formats[MXC_ISI_SD_PAD_SINK];
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1308 struct v4l2_mbus_framefmt *format;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1309 struct v4l2_rect *rect;
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1310 unsigned long flags;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1311 int ret = 0;
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1312
7180b8d137a989 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1313 mutex_lock(&pipe->lock);
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1314
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1315 switch (sel->target) {
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1316 case V4L2_SEL_TGT_CROP:
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1317 if (sel->pad != MXC_ISI_SD_PAD_SOURCE) {
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1318 /* The pipeline support cropping on the source only. */
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1319 ret = -EINVAL;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1320 break;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1321 }
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1322
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1323 /* The source crop is bound by the sink compose. */
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1324 rect = mxc_isi_pipe_get_pad_compose(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1325 MXC_ISI_SD_PAD_SINK);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1326 sel->r.left = clamp_t(s32, sel->r.left, 0, rect->width - 1);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1327 sel->r.top = clamp_t(s32, sel->r.top, 0, rect->height - 1);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1328 sel->r.width = clamp(sel->r.width, MXC_ISI_MIN_WIDTH,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1329 rect->width - sel->r.left);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1330 sel->r.height = clamp(sel->r.height, MXC_ISI_MIN_HEIGHT,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1331 rect->height - sel->r.top);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1332
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1333 rect = mxc_isi_pipe_get_pad_crop(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1334 MXC_ISI_SD_PAD_SOURCE);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1335 *rect = sel->r;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1336
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1337 /* Propagate the crop rectangle to the source pad. */
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1338 format = mxc_isi_pipe_get_pad_format(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1339 MXC_ISI_SD_PAD_SOURCE);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1340 format->width = sel->r.width;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1341 format->height = sel->r.height;
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1342 break;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1343
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1344 case V4L2_SEL_TGT_COMPOSE:
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1345 if (sel->pad != MXC_ISI_SD_PAD_SINK) {
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1346 /* Composing is supported on the sink only. */
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1347 ret = -EINVAL;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1348 break;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1349 }
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1350
c24b3c44b1d2c7 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1351 f = &pipe->formats[MXC_ISI_SD_PAD_SOURCE];
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1352
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1353 /* The sink crop is bound by the sink format downscaling only). */
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1354 format = mxc_isi_pipe_get_pad_format(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1355 MXC_ISI_SD_PAD_SINK);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1356
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1357 sel->r.left = 0;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1358 sel->r.top = 0;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1359 sel->r.width = clamp(sel->r.width, MXC_ISI_MIN_WIDTH,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1360 format->width);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1361 sel->r.height = clamp(sel->r.height, MXC_ISI_MIN_HEIGHT,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1362 format->height);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1363
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1364 rect = mxc_isi_pipe_get_pad_compose(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1365 MXC_ISI_SD_PAD_SINK);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1366 *rect = sel->r;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1367
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1368 /* Propagate the compose rectangle to the source pad. */
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1369 rect = mxc_isi_pipe_get_pad_crop(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1370 MXC_ISI_SD_PAD_SOURCE);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1371 rect->left = 0;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1372 rect->top = 0;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1373 rect->width = sel->r.width;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1374 rect->height = sel->r.height;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1375
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1376 format = mxc_isi_pipe_get_pad_format(pipe, cfg, sel->which,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1377 MXC_ISI_SD_PAD_SOURCE);
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1378 format->width = sel->r.width;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1379 format->height = sel->r.height;
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1380 break;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1381
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1382 default:
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1383 ret = -EINVAL;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1384 break;
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1385 }
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1386
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1387 mutex_unlock(&pipe->lock);
974e3749f89ef0 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1388
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1389 if (ret < 0)
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1390 return ret;
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1391
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1392 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
7180b8d137a989 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1393 spin_lock_irqsave(&pipe->slock, flags);
07054221290d22 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1394 /*
07054221290d22 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1395 * FIXME: Support moving the crop rectangle when the pipeline
07054221290d22 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1396 * is streaming.
07054221290d22 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1397 */
7180b8d137a989 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1398 spin_unlock_irqrestore(&pipe->slock, flags);
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1399 }
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1400
7180b8d137a989 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-04-19 1401 dev_dbg(pipe->isi->dev, "%s, target %#x: (%d,%d)/%dx%d", __func__,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1402 sel->target, sel->r.left, sel->r.top, sel->r.width,
6c1513c3a92617 drivers/staging/media/imx/imx8-isi-pipe.c Laurent Pinchart 2021-05-17 1403 sel->r.height);
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1404
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1405 return 0;
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1406 }
b5b373a37727bb drivers/staging/media/imx/imx8-isi-cap.c Guoniu.zhou 2019-01-21 1407
:::::: The code at line 1307 was first introduced by commit
:::::: c24b3c44b1d2c7e81b3fd6ef41afcfdbe76c05b8 staging: media: imx: isi: pipe: Store subdev formats in array
:::::: TO: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com>
:::::: CC: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/staging/rtl8712/rtl871x_cmd.c:670:27: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
date: 3 weeks ago
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d991bb1c8da842a2a0b9dc83b1005e655783f861
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/staging/rtl8712/rtl871x_cmd.c:438:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] Length @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:438:29: sparse: expected unsigned int [usertype] Length
drivers/staging/rtl8712/rtl871x_cmd.c:438:29: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:439:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SsidLength @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:439:38: sparse: expected unsigned int [usertype] SsidLength
drivers/staging/rtl8712/rtl871x_cmd.c:439:38: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:441:32: sparse: sparse: cast from restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:442:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed int [usertype] Rssi @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:442:27: sparse: expected signed int [usertype] Rssi
drivers/staging/rtl8712/rtl871x_cmd.c:442:27: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:443:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:443:39: sparse: expected unsigned int enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse
drivers/staging/rtl8712/rtl871x_cmd.c:443:39: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:445:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ATIMWindow @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:445:47: sparse: expected unsigned int [usertype] ATIMWindow
drivers/staging/rtl8712/rtl871x_cmd.c:445:47: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:447:49: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] BeaconPeriod @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:447:49: sparse: expected unsigned int [usertype] BeaconPeriod
drivers/staging/rtl8712/rtl871x_cmd.c:447:49: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:449:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] DSConfig @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:449:45: sparse: expected unsigned int [usertype] DSConfig
drivers/staging/rtl8712/rtl871x_cmd.c:449:45: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:451:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] DwellTime @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:451:55: sparse: expected unsigned int [usertype] DwellTime
drivers/staging/rtl8712/rtl871x_cmd.c:451:55: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:453:56: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] HopPattern @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:453:56: sparse: expected unsigned int [usertype] HopPattern
drivers/staging/rtl8712/rtl871x_cmd.c:453:56: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:455:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] HopSet @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:455:52: sparse: expected unsigned int [usertype] HopSet
drivers/staging/rtl8712/rtl871x_cmd.c:455:52: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:457:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] Length @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:457:52: sparse: expected unsigned int [usertype] Length
drivers/staging/rtl8712/rtl871x_cmd.c:457:52: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:459:43: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] Length @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:459:43: sparse: expected unsigned int [usertype] Length
drivers/staging/rtl8712/rtl871x_cmd.c:459:43: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:461:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:461:41: sparse: expected unsigned int enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode
drivers/staging/rtl8712/rtl871x_cmd.c:461:41: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:463:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] IELength @@ got restricted __le32 [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:463:31: sparse: expected unsigned int [usertype] IELength
drivers/staging/rtl8712/rtl871x_cmd.c:463:31: sparse: got restricted __le32 [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:668:28: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:669:37: sparse: sparse: cast to restricted __le32
>> drivers/staging/rtl8712/rtl871x_cmd.c:670:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] Privacy @@ got unsigned int [usertype] @@
drivers/staging/rtl8712/rtl871x_cmd.c:670:27: sparse: expected restricted __le32 [usertype] Privacy
drivers/staging/rtl8712/rtl871x_cmd.c:670:27: sparse: got unsigned int [usertype]
drivers/staging/rtl8712/rtl871x_cmd.c:671:26: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:672:38: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:674:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:676:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:678:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:680:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:682:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:684:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:686:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:688:17: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_cmd.c:689:30: sparse: sparse: cast to restricted __le32
--
drivers/staging/rtl8712/rtl871x_mlme.c:458:28: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:459:37: sparse: sparse: cast to restricted __le32
>> drivers/staging/rtl8712/rtl871x_mlme.c:460:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] Privacy @@ got unsigned int [usertype] @@
drivers/staging/rtl8712/rtl871x_mlme.c:460:27: sparse: expected restricted __le32 [usertype] Privacy
drivers/staging/rtl8712/rtl871x_mlme.c:460:27: sparse: got unsigned int [usertype]
drivers/staging/rtl8712/rtl871x_mlme.c:461:26: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:462:38: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:464:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:466:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:468:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:470:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:472:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:474:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:476:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:478:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:480:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:481:30: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:677:30: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:678:34: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:679:36: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:681:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:682:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] Privacy @@ got unsigned int [usertype] @@
drivers/staging/rtl8712/rtl871x_mlme.c:682:35: sparse: expected restricted __le32 [usertype] Privacy
drivers/staging/rtl8712/rtl871x_mlme.c:682:35: sparse: got unsigned int [usertype]
drivers/staging/rtl8712/rtl871x_mlme.c:683:34: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:685:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:687:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:689:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:691:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:693:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:696:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:699:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:701:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:703:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:705:18: sparse: sparse: cast to restricted __le32
drivers/staging/rtl8712/rtl871x_mlme.c:706:38: sparse: sparse: cast to restricted __le32
vim +670 drivers/staging/rtl8712/rtl871x_cmd.c
2865d42c78a912 Larry Finger 2010-08-20 651
2865d42c78a912 Larry Finger 2010-08-20 652 void r8712_createbss_cmd_callback(struct _adapter *padapter,
2865d42c78a912 Larry Finger 2010-08-20 653 struct cmd_obj *pcmd)
2865d42c78a912 Larry Finger 2010-08-20 654 {
2865d42c78a912 Larry Finger 2010-08-20 655 unsigned long irqL;
2865d42c78a912 Larry Finger 2010-08-20 656 struct sta_info *psta = NULL;
2865d42c78a912 Larry Finger 2010-08-20 657 struct wlan_network *pwlan = NULL;
2865d42c78a912 Larry Finger 2010-08-20 658 struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
44367877c6c504 Joshua Clayton 2015-08-05 659 struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf;
2865d42c78a912 Larry Finger 2010-08-20 660 struct wlan_network *tgt_network = &(pmlmepriv->cur_network);
2865d42c78a912 Larry Finger 2010-08-20 661
34a2c5fe5b33fd Gulsah Kose 2014-03-12 662 if (pcmd->res != H2C_SUCCESS)
c703c750cc247c Vaishali Thakkar 2015-02-27 663 mod_timer(&pmlmepriv->assoc_timer,
c703c750cc247c Vaishali Thakkar 2015-02-27 664 jiffies + msecs_to_jiffies(1));
39a6e7376af08b Sudip Mukherjee 2015-05-15 665 del_timer(&pmlmepriv->assoc_timer);
2865d42c78a912 Larry Finger 2010-08-20 666 #ifdef __BIG_ENDIAN
2865d42c78a912 Larry Finger 2010-08-20 667 /* endian_convert */
2865d42c78a912 Larry Finger 2010-08-20 668 pnetwork->Length = le32_to_cpu(pnetwork->Length);
2865d42c78a912 Larry Finger 2010-08-20 669 pnetwork->Ssid.SsidLength = le32_to_cpu(pnetwork->Ssid.SsidLength);
2865d42c78a912 Larry Finger 2010-08-20 @670 pnetwork->Privacy = le32_to_cpu(pnetwork->Privacy);
2865d42c78a912 Larry Finger 2010-08-20 671 pnetwork->Rssi = le32_to_cpu(pnetwork->Rssi);
2865d42c78a912 Larry Finger 2010-08-20 672 pnetwork->NetworkTypeInUse = le32_to_cpu(pnetwork->NetworkTypeInUse);
b78559b60518eb Martin Homuth 2017-12-19 673 pnetwork->Configuration.ATIMWindow =
b78559b60518eb Martin Homuth 2017-12-19 674 le32_to_cpu(pnetwork->Configuration.ATIMWindow);
b78559b60518eb Martin Homuth 2017-12-19 675 pnetwork->Configuration.DSConfig =
b78559b60518eb Martin Homuth 2017-12-19 676 le32_to_cpu(pnetwork->Configuration.DSConfig);
b78559b60518eb Martin Homuth 2017-12-19 677 pnetwork->Configuration.FHConfig.DwellTime =
b78559b60518eb Martin Homuth 2017-12-19 678 le32_to_cpu(pnetwork->Configuration.FHConfig.DwellTime);
b78559b60518eb Martin Homuth 2017-12-19 679 pnetwork->Configuration.FHConfig.HopPattern =
b78559b60518eb Martin Homuth 2017-12-19 680 le32_to_cpu(pnetwork->Configuration.FHConfig.HopPattern);
b78559b60518eb Martin Homuth 2017-12-19 681 pnetwork->Configuration.FHConfig.HopSet =
b78559b60518eb Martin Homuth 2017-12-19 682 le32_to_cpu(pnetwork->Configuration.FHConfig.HopSet);
b78559b60518eb Martin Homuth 2017-12-19 683 pnetwork->Configuration.FHConfig.Length =
b78559b60518eb Martin Homuth 2017-12-19 684 le32_to_cpu(pnetwork->Configuration.FHConfig.Length);
b78559b60518eb Martin Homuth 2017-12-19 685 pnetwork->Configuration.Length =
b78559b60518eb Martin Homuth 2017-12-19 686 le32_to_cpu(pnetwork->Configuration.Length);
b78559b60518eb Martin Homuth 2017-12-19 687 pnetwork->InfrastructureMode =
b78559b60518eb Martin Homuth 2017-12-19 688 le32_to_cpu(pnetwork->InfrastructureMode);
2865d42c78a912 Larry Finger 2010-08-20 689 pnetwork->IELength = le32_to_cpu(pnetwork->IELength);
2865d42c78a912 Larry Finger 2010-08-20 690 #endif
2865d42c78a912 Larry Finger 2010-08-20 691 spin_lock_irqsave(&pmlmepriv->lock, irqL);
2865d42c78a912 Larry Finger 2010-08-20 692 if ((pmlmepriv->fw_state) & WIFI_AP_STATE) {
2865d42c78a912 Larry Finger 2010-08-20 693 psta = r8712_get_stainfo(&padapter->stapriv,
2865d42c78a912 Larry Finger 2010-08-20 694 pnetwork->MacAddress);
2865d42c78a912 Larry Finger 2010-08-20 695 if (!psta) {
2865d42c78a912 Larry Finger 2010-08-20 696 psta = r8712_alloc_stainfo(&padapter->stapriv,
2865d42c78a912 Larry Finger 2010-08-20 697 pnetwork->MacAddress);
11975c56b6d130 Sandhya Bankar 2016-09-20 698 if (!psta)
2865d42c78a912 Larry Finger 2010-08-20 699 goto createbss_cmd_fail;
2865d42c78a912 Larry Finger 2010-08-20 700 }
2865d42c78a912 Larry Finger 2010-08-20 701 r8712_indicate_connect(padapter);
2865d42c78a912 Larry Finger 2010-08-20 702 } else {
2865d42c78a912 Larry Finger 2010-08-20 703 pwlan = _r8712_alloc_network(pmlmepriv);
11975c56b6d130 Sandhya Bankar 2016-09-20 704 if (!pwlan) {
2865d42c78a912 Larry Finger 2010-08-20 705 pwlan = r8712_get_oldest_wlan_network(
2865d42c78a912 Larry Finger 2010-08-20 706 &pmlmepriv->scanned_queue);
11975c56b6d130 Sandhya Bankar 2016-09-20 707 if (!pwlan)
2865d42c78a912 Larry Finger 2010-08-20 708 goto createbss_cmd_fail;
2865d42c78a912 Larry Finger 2010-08-20 709 pwlan->last_scanned = jiffies;
a7e585918ecd5a Liam Ryan 2017-09-12 710 } else {
fdfbf7890dcac9 James A Shackleford 2014-06-24 711 list_add_tail(&(pwlan->list),
2865d42c78a912 Larry Finger 2010-08-20 712 &pmlmepriv->scanned_queue.queue);
a7e585918ecd5a Liam Ryan 2017-09-12 713 }
986fc8e7410d65 Joshua Clayton 2015-08-05 714 pnetwork->Length = r8712_get_wlan_bssid_ex_sz(pnetwork);
2865d42c78a912 Larry Finger 2010-08-20 715 memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
2865d42c78a912 Larry Finger 2010-08-20 716 pwlan->fixed = true;
2865d42c78a912 Larry Finger 2010-08-20 717 memcpy(&tgt_network->network, pnetwork,
986fc8e7410d65 Joshua Clayton 2015-08-05 718 (r8712_get_wlan_bssid_ex_sz(pnetwork)));
2865d42c78a912 Larry Finger 2010-08-20 719 if (pmlmepriv->fw_state & _FW_UNDER_LINKING)
2865d42c78a912 Larry Finger 2010-08-20 720 pmlmepriv->fw_state ^= _FW_UNDER_LINKING;
8292b4de4ee67a Louie Lu 2016-09-02 721 /*
8292b4de4ee67a Louie Lu 2016-09-02 722 * we will set _FW_LINKED when there is one more sat to
8292b4de4ee67a Louie Lu 2016-09-02 723 * join us (stassoc_event_callback)
8292b4de4ee67a Louie Lu 2016-09-02 724 */
2865d42c78a912 Larry Finger 2010-08-20 725 }
2865d42c78a912 Larry Finger 2010-08-20 726 createbss_cmd_fail:
2865d42c78a912 Larry Finger 2010-08-20 727 spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
2865d42c78a912 Larry Finger 2010-08-20 728 r8712_free_cmd_obj(pcmd);
2865d42c78a912 Larry Finger 2010-08-20 729 }
2865d42c78a912 Larry Finger 2010-08-20 730
:::::: The code at line 670 was first introduced by commit
:::::: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef staging: r8712u: Add the new driver to the mainline kernel
:::::: TO: Larry Finger <Larry.Finger(a)lwfinger.net>
:::::: CC: Larry Finger <Larry.Finger(a)lwfinger.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[luto:x86/kentry 6/11] arch/x86/entry/common.c:116:7: warning: variable 'ret' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/kentry
head: fb951a475a1cd1e5e280ee8b4ce64a6a68c77b64
commit: 5c61d03b2b823992b0e8eba73d2be61947f00323 [6/11] kentry: Simplify the common syscall API
config: i386-randconfig-r035-20210519 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/kentry
git checkout 5c61d03b2b823992b0e8eba73d2be61947f00323
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/x86/entry/common.c:90:24: warning: no previous prototype for 'do_int80_syscall_32' [-Wmissing-prototypes]
90 | __visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c: In function '__do_fast_syscall_32':
>> arch/x86/entry/common.c:116:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
116 | bool ret;
| ^~~
arch/x86/entry/common.c: At top level:
arch/x86/entry/common.c:161:24: warning: no previous prototype for 'do_fast_syscall_32' [-Wmissing-prototypes]
161 | __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:213:24: warning: no previous prototype for 'do_SYSENTER_32' [-Wmissing-prototypes]
213 | __visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
vim +/ret +116 arch/x86/entry/common.c
112
113 static noinstr bool __do_fast_syscall_32(struct pt_regs *regs)
114 {
115 unsigned int nr = syscall_32_enter(regs);
> 116 bool ret;
117 int res;
118
119 add_random_kstack_offset();
120 kentry_enter_from_user_mode(regs);
121 instrumentation_begin();
122 local_irq_enable();
123
124 /* Fetch EBP from where the vDSO stashed it. */
125 if (IS_ENABLED(CONFIG_X86_64)) {
126 /*
127 * Micro-optimization: the pointer we're following is
128 * explicitly 32 bits, so it can't be out of range.
129 */
130 res = __get_user(*(u32 *)®s->bp,
131 (u32 __user __force *)(unsigned long)(u32)regs->sp);
132 } else {
133 res = get_user(*(u32 *)®s->bp,
134 (u32 __user __force *)(unsigned long)(u32)regs->sp);
135 }
136
137 if (res) {
138 /* User code screwed up. */
139 regs->ax = -EFAULT;
140 ret = false;
141 goto out;
142 }
143
144 /* The case truncates any ptrace induced syscall nr > 2^32 -1 */
145 nr = (unsigned int)kentry_syscall_begin(regs, nr);
146
147 /* Now this is just like a normal syscall. */
148 do_syscall_32_irqs_on(regs, nr);
149
150 kentry_syscall_end(regs);
151 ret = true;
152
153 out:
154 local_irq_disable();
155 instrumentation_end();
156 kentry_exit_to_user_mode(regs);
157 return true;
158 }
159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months