drivers/bluetooth/btintel.c:441:33: sparse: sparse: cast to restricted __le32
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: 66500bbc7d6b4915cae86d64c72591cb70698c9d Bluetooth: btintel: Fix endianness issue for TLV version information
date: 11 months ago
config: riscv-randconfig-s031-20211109 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.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.4-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 66500bbc7d6b4915cae86d64c72591cb70698c9d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash block/ drivers/bluetooth/ drivers/hid/ drivers/hwmon/ drivers/i2c/busses/ drivers/message/fusion/ drivers/net/ethernet/ drivers/net/wireless/intel/iwlwifi/ drivers/pci/ drivers/remoteproc/ drivers/rtc/ drivers/staging/rts5208/ drivers/staging/vc04_services/ drivers/tty/serial/ drivers/vdpa/ drivers/video/fbdev/ net/qrtr/ net/sched/
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/bluetooth/btintel.c:441:33: sparse: sparse: cast to restricted __le32
drivers/bluetooth/btintel.c:445:33: sparse: sparse: cast to restricted __le32
drivers/bluetooth/btintel.c:449:33: sparse: sparse: cast to restricted __le32
drivers/bluetooth/btintel.c:453:33: sparse: sparse: cast to restricted __le32
>> drivers/bluetooth/btintel.c:457:33: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btintel.c:464:33: sparse: sparse: cast to restricted __le16
drivers/bluetooth/btintel.c:471:33: sparse: sparse: cast to restricted __le32
vim +441 drivers/bluetooth/btintel.c
403
404 int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *version)
405 {
406 struct sk_buff *skb;
407 const u8 param[1] = { 0xFF };
408
409 if (!version)
410 return -EINVAL;
411
412 skb = __hci_cmd_sync(hdev, 0xfc05, 1, param, HCI_CMD_TIMEOUT);
413 if (IS_ERR(skb)) {
414 bt_dev_err(hdev, "Reading Intel version information failed (%ld)",
415 PTR_ERR(skb));
416 return PTR_ERR(skb);
417 }
418
419 if (skb->data[0]) {
420 bt_dev_err(hdev, "Intel Read Version command failed (%02x)",
421 skb->data[0]);
422 kfree_skb(skb);
423 return -EIO;
424 }
425
426 /* Consume Command Complete Status field */
427 skb_pull(skb, 1);
428
429 /* Event parameters contatin multiple TLVs. Read each of them
430 * and only keep the required data. Also, it use existing legacy
431 * version field like hw_platform, hw_variant, and fw_variant
432 * to keep the existing setup flow
433 */
434 while (skb->len) {
435 struct intel_tlv *tlv;
436
437 tlv = (struct intel_tlv *)skb->data;
438 switch (tlv->type) {
439 case INTEL_TLV_CNVI_TOP:
440 version->cnvi_top =
> 441 __le32_to_cpu(get_unaligned_le32(tlv->val));
442 break;
443 case INTEL_TLV_CNVR_TOP:
444 version->cnvr_top =
445 __le32_to_cpu(get_unaligned_le32(tlv->val));
446 break;
447 case INTEL_TLV_CNVI_BT:
448 version->cnvi_bt =
449 __le32_to_cpu(get_unaligned_le32(tlv->val));
450 break;
451 case INTEL_TLV_CNVR_BT:
452 version->cnvr_bt =
453 __le32_to_cpu(get_unaligned_le32(tlv->val));
454 break;
455 case INTEL_TLV_DEV_REV_ID:
456 version->dev_rev_id =
> 457 __le16_to_cpu(get_unaligned_le16(tlv->val));
458 break;
459 case INTEL_TLV_IMAGE_TYPE:
460 version->img_type = tlv->val[0];
461 break;
462 case INTEL_TLV_TIME_STAMP:
463 version->timestamp =
464 __le16_to_cpu(get_unaligned_le16(tlv->val));
465 break;
466 case INTEL_TLV_BUILD_TYPE:
467 version->build_type = tlv->val[0];
468 break;
469 case INTEL_TLV_BUILD_NUM:
470 version->build_num =
471 __le32_to_cpu(get_unaligned_le32(tlv->val));
472 break;
473 case INTEL_TLV_SECURE_BOOT:
474 version->secure_boot = tlv->val[0];
475 break;
476 case INTEL_TLV_OTP_LOCK:
477 version->otp_lock = tlv->val[0];
478 break;
479 case INTEL_TLV_API_LOCK:
480 version->api_lock = tlv->val[0];
481 break;
482 case INTEL_TLV_DEBUG_LOCK:
483 version->debug_lock = tlv->val[0];
484 break;
485 case INTEL_TLV_MIN_FW:
486 version->min_fw_build_nn = tlv->val[0];
487 version->min_fw_build_cw = tlv->val[1];
488 version->min_fw_build_yy = tlv->val[2];
489 break;
490 case INTEL_TLV_LIMITED_CCE:
491 version->limited_cce = tlv->val[0];
492 break;
493 case INTEL_TLV_SBE_TYPE:
494 version->sbe_type = tlv->val[0];
495 break;
496 case INTEL_TLV_OTP_BDADDR:
497 memcpy(&version->otp_bd_addr, tlv->val, tlv->len);
498 break;
499 default:
500 /* Ignore rest of information */
501 break;
502 }
503 /* consume the current tlv and move to next*/
504 skb_pull(skb, tlv->len + sizeof(*tlv));
505 }
506
507 kfree_skb(skb);
508 return 0;
509 }
510 EXPORT_SYMBOL_GPL(btintel_read_version_tlv);
511
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[zen:5.15/lru 12/13] mm/vmscan.c:188:54: error: 'CONFIG_ANON_MIN_KBYTES' undeclared here (not in a function)
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.15/lru
head: 9c0236bacebd2c7783322c02a862ec8e6fac9f34
commit: 6ea6a04a179922d0a8b47d8bef2b56cd48d72da9 [12/13] mm/vmscan: add sysctl knobs for protecting the working set
config: arm-buildonly-randconfig-r005-20211111 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/zen-kernel/zen-kernel/commit/6ea6a04a179922d0a8b47d8be...
git remote add zen https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.15/lru
git checkout 6ea6a04a179922d0a8b47d8bef2b56cd48d72da9
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
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 >>):
>> mm/vmscan.c:188:54: error: 'CONFIG_ANON_MIN_KBYTES' undeclared here (not in a function)
188 | unsigned long sysctl_anon_min_kbytes __read_mostly = CONFIG_ANON_MIN_KBYTES;
| ^~~~~~~~~~~~~~~~~~~~~~
>> mm/vmscan.c:189:55: error: 'CONFIG_CLEAN_LOW_KBYTES' undeclared here (not in a function)
189 | unsigned long sysctl_clean_low_kbytes __read_mostly = CONFIG_CLEAN_LOW_KBYTES;
| ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmscan.c:190:55: error: 'CONFIG_CLEAN_MIN_KBYTES' undeclared here (not in a function)
190 | unsigned long sysctl_clean_min_kbytes __read_mostly = CONFIG_CLEAN_MIN_KBYTES;
| ^~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c: In function 'demote_page_list':
mm/vmscan.c:1360:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
1360 | int err;
| ^~~
vim +/CONFIG_ANON_MIN_KBYTES +188 mm/vmscan.c
187
> 188 unsigned long sysctl_anon_min_kbytes __read_mostly = CONFIG_ANON_MIN_KBYTES;
> 189 unsigned long sysctl_clean_low_kbytes __read_mostly = CONFIG_CLEAN_LOW_KBYTES;
> 190 unsigned long sysctl_clean_min_kbytes __read_mostly = CONFIG_CLEAN_MIN_KBYTES;
191
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[morse:mpam/snapshot/v5.15 9/139] arch/x86/kernel/cpu/resctrl/core.c:400:6: error: no previous prototype for 'setup_default_ctrlval'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.15
head: ce3629841262f725a5f3a327403fcaf0e604a85e
commit: c40ac46dd98eac3ed1ab60d72d54344a4ead0e92 [9/139] x86/resctrl: Remove architecture copy of mbps_val
config: x86_64-allyesconfig (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/morse/linux.git/commit/?i...
git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
git fetch --no-tags morse mpam/snapshot/v5.15
git checkout c40ac46dd98eac3ed1ab60d72d54344a4ead0e92
# save the attached .config to linux build tree
make W=1 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 >>):
arch/x86/kernel/cpu/resctrl/core.c: In function 'cache_alloc_hsw_probe':
arch/x86/kernel/cpu/resctrl/core.c:133:9: error: variable 'h' set but not used [-Werror=unused-but-set-variable]
133 | u32 l, h, max_cbm = BIT_MASK(20) - 1;
| ^
arch/x86/kernel/cpu/resctrl/core.c: At top level:
>> arch/x86/kernel/cpu/resctrl/core.c:400:6: error: no previous prototype for 'setup_default_ctrlval' [-Werror=missing-prototypes]
400 | void setup_default_ctrlval(struct rdt_resource *r, u32 *dc)
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/cpu/resctrl/core.c:414:6: error: no previous prototype for 'domain_free' [-Werror=missing-prototypes]
414 | void domain_free(struct rdt_hw_domain *hw_dom)
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/setup_default_ctrlval +400 arch/x86/kernel/cpu/resctrl/core.c
399
> 400 void setup_default_ctrlval(struct rdt_resource *r, u32 *dc)
401 {
402 struct rdt_hw_resource *hw_res = resctrl_to_arch_res(r);
403 int i;
404
405 /*
406 * Initialize the Control MSRs to having no control.
407 * For Cache Allocation: Set all bits in cbm
408 * For Memory Allocation: Set b/w requested to 100%
409 */
410 for (i = 0; i < hw_res->num_closid; i++, dc++)
411 *dc = r->default_ctrl;
412 }
413
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:pr/490 13015/15241] drivers/gpu/drm/bridge/it6161.c:2798:31: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'?
by kernel test robot
tree: https://github.com/Freescale/linux-fslc pr/490
head: e1744bcfc0ba973d84a580a510206e682c10cfcb
commit: a10ae796897faee61308958f1497c7948a2165d4 [13015/15241] LF-4229-1: drm: bridge: it6161: add enable gpio
config: h8300-allyesconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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/a10ae796897faee61308958f14...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/490
git checkout a10ae796897faee61308958f1497c7948a2165d4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300
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 include/linux/ioport.h:13,
from include/linux/acpi.h:12,
from include/linux/i2c.h:13,
from include/drm/drm_crtc.h:28,
from include/drm/drm_atomic_helper.h:31,
from drivers/gpu/drm/bridge/it6161.c:5:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:93:51: warning: ordered comparison of pointer with null pointer [-Wextra]
93 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'it6161_hdmi_tx_abort_ddc':
drivers/gpu/drm/bridge/it6161.c:841:22: warning: variable 'ddc_master' set but not used [-Wunused-but-set-variable]
841 | u8 sw_reset, ddc_master, retry = 2;
| ^~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: At top level:
drivers/gpu/drm/bridge/it6161.c:1372:5: warning: no previous prototype for 'hdmi_tx_calc_pclk' [-Wmissing-prototypes]
1372 | u32 hdmi_tx_calc_pclk(struct it6161 *it6161)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'hdmi_tx_get_display_mode':
drivers/gpu/drm/bridge/it6161.c:1429:33: warning: variable 'display_mode' set but not used [-Wunused-but-set-variable]
1429 | struct drm_display_mode display_mode;
| ^~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'setHDMITX_NLPCMAudio':
drivers/gpu/drm/bridge/it6161.c:1833:25: warning: variable 'AudioFormat' set but not used [-Wunused-but-set-variable]
1833 | u8 AudioEnable, AudioFormat;
| ^~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'mipi_rx_prec_get_display_mode':
drivers/gpu/drm/bridge/it6161.c:2361:39: warning: variable 'p_vback_porch' set but not used [-Wunused-but-set-variable]
2361 | int p_vfront_porch, p_vsyncw, p_vback_porch, p_vactive, p_vtotal;
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c:2360:39: warning: variable 'p_hback_porch' set but not used [-Wunused-but-set-variable]
2360 | int p_hfront_porch, p_hsyncw, p_hback_porch, p_hactive, p_htotal;
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c: In function 'it6161_i2c_probe':
>> drivers/gpu/drm/bridge/it6161.c:2798:31: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration]
2798 | it6161->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
| ^~~~~~~~~~~~~~~~~~~~~~~
| devm_regulator_get_optional
>> drivers/gpu/drm/bridge/it6161.c:2798:70: error: 'GPIOD_OUT_LOW' undeclared (first use in this function)
2798 | it6161->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
| ^~~~~~~~~~~~~
drivers/gpu/drm/bridge/it6161.c:2798:70: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/bridge/it6161.c:2802:17: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
2802 | gpiod_set_value_cansleep(it6161->enable_gpio, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for UIO
Depends on MMU
Selected by
- FEC_UIO && NETDEVICES && ETHERNET && NET_VENDOR_FREESCALE
vim +2798 drivers/gpu/drm/bridge/it6161.c
2753
2754 static int it6161_i2c_probe(struct i2c_client *i2c_mipi_rx,
2755 const struct i2c_device_id *id)
2756 {
2757 struct device *dev = &i2c_mipi_rx->dev;
2758 int err, intp_irq;
2759
2760 it6161 = devm_kzalloc(dev, sizeof(*it6161), GFP_KERNEL);
2761 if (!it6161)
2762 return -ENOMEM;
2763
2764 it6161->i2c_mipi_rx = i2c_mipi_rx;
2765 mutex_init(&it6161->mode_lock);
2766
2767 it6161->bridge.of_node = i2c_mipi_rx->dev.of_node;
2768
2769 it6161_parse_dt(it6161, dev->of_node);
2770 it6161->regmap_mipi_rx = devm_regmap_init_i2c(i2c_mipi_rx, &it6161_mipi_rx_bridge_regmap_config);
2771 if (IS_ERR(it6161->regmap_mipi_rx)) {
2772 DRM_DEV_ERROR(dev, "regmap_mipi_rx i2c init failed");
2773 return PTR_ERR(it6161->regmap_mipi_rx);
2774 }
2775
2776 if (device_property_read_u32(dev, "it6161-addr-hdmi-tx", &it6161->it6161_addr_hdmi_tx) < 0)
2777 it6161->it6161_addr_hdmi_tx = 0x4C;
2778 it6161->i2c_hdmi_tx = i2c_new_dummy_device(i2c_mipi_rx->adapter, it6161->it6161_addr_hdmi_tx);
2779 it6161->regmap_hdmi_tx = devm_regmap_init_i2c(it6161->i2c_hdmi_tx, &it6161_hdmi_tx_bridge_regmap_config);
2780 if (IS_ERR(it6161->regmap_hdmi_tx)) {
2781 DRM_DEV_ERROR(dev, "regmap_hdmi_tx i2c init failed");
2782 return PTR_ERR(it6161->regmap_mipi_rx);
2783 }
2784
2785 if (device_property_read_u32(dev, "it6161-addr-cec", &it6161->it6161_addr_cec) < 0)
2786 it6161->it6161_addr_cec = 0x4E;
2787 it6161->i2c_cec = i2c_new_dummy_device(i2c_mipi_rx->adapter, it6161->it6161_addr_cec);
2788 it6161->regmap_cec = devm_regmap_init_i2c(it6161->i2c_cec, &it6161_cec_bridge_regmap_config);
2789 if (IS_ERR(it6161->regmap_cec)) {
2790 DRM_DEV_ERROR(dev, "regmap_cec i2c init failed");
2791 return PTR_ERR(it6161->regmap_cec);
2792 }
2793
2794 if (!it6161_check_device_ready(it6161))
2795 return -ENODEV;
2796
2797 /* The enable GPIO is optional. */
> 2798 it6161->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
2799 if (IS_ERR(it6161->enable_gpio))
2800 DRM_DEV_INFO(dev, "No enable GPIO");
2801 else
> 2802 gpiod_set_value_cansleep(it6161->enable_gpio, 1);
2803
2804 it6161->enable_drv_hold = DEFAULT_DRV_HOLD;
2805 it6161_set_interrupts_active_level(HIGH);
2806
2807 intp_irq = i2c_mipi_rx->irq;
2808
2809 if (!intp_irq) {
2810 DRM_DEV_ERROR(dev, "it6112 failed to get INTP IRQ");
2811 return -ENODEV;
2812 }
2813
2814 err = devm_request_threaded_irq(&i2c_mipi_rx->dev, intp_irq, NULL,
2815 it6161_intp_threaded_handler,
2816 IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "it6161-intp", it6161);
2817 if (err) {
2818 DRM_DEV_ERROR(dev, "it6112 failed to request INTP threaded IRQ: %d", err);
2819 return err;
2820 }
2821
2822 i2c_set_clientdata(i2c_mipi_rx, it6161);
2823 it6161->bridge.funcs = &it6161_bridge_funcs;
2824 it6161->bridge.of_node = i2c_mipi_rx->dev.of_node;
2825 it6161->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
2826 DRM_BRIDGE_OP_HPD | DRM_BRIDGE_OP_MODES;
2827 it6161->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
2828
2829 drm_bridge_add(&it6161->bridge);
2830
2831 err = sysfs_create_files(&i2c_mipi_rx->dev.kobj, it6161_attrs);
2832 if (err)
2833 return err;
2834
2835 return 0;
2836 }
2837
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[chenxing:rperier-timer 14/15] drivers/clocksource/timer-msc313e.c:38:28: error: field 'delay' has incomplete type
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git rperier-timer
head: b1770620df3a9763e6da64aadadf52c779ffbf46
commit: f3ee681379df14bb1810edf7f0609a1d63f03d4a [14/15] clocksource: Add support for timekeeping on MStar MSC313e (WIP)
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/linux-chenxing/linux/commit/f3ee681379df14bb1810edf7f0...
git remote add chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags chenxing rperier-timer
git checkout f3ee681379df14bb1810edf7f0609a1d63f03d4a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/clocksource/timer-msc313e.c:38:28: error: field 'delay' has incomplete type
38 | struct delay_timer delay;
| ^~~~~
drivers/clocksource/timer-msc313e.c: In function 'msc313e_delay_init':
>> drivers/clocksource/timer-msc313e.c:222:9: error: implicit declaration of function 'register_current_timer_delay' [-Werror=implicit-function-declaration]
222 | register_current_timer_delay(&msc313e_delay->delay);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/delay +38 drivers/clocksource/timer-msc313e.c
35
36 struct msc313e_delay {
37 void __iomem * base;
> 38 struct delay_timer delay;
39 };
40
41 static struct timer_of *msc313e_clkevt;
42 static void __iomem *msc313e_clksrc;
43 static struct msc313e_delay *msc313e_delay;
44
45 static void msc313e_timer_stop(void __iomem *base)
46 {
47 writew(0, base + MSC313E_REG_CTRL);
48 }
49
50 static void msc313e_timer_start(void __iomem *base, bool periodic)
51 {
52 u16 reg;
53
54 reg = readw(base + MSC313E_REG_CTRL);
55 if (periodic)
56 reg |= MSC313E_REG_CTRL_TIMER_EN;
57 else
58 reg |= MSC313E_REG_CTRL_TIMER_TRIG;
59 writew(reg | MSC313E_REG_CTRL_TIMER_INT_EN, base + MSC313E_REG_CTRL);
60 }
61
62 static void msc313e_timer_setup(void __iomem *base, unsigned long delay)
63 {
64 writew(delay >> 16, base + MSC313E_REG_TIMER_MAX_HIGH);
65 writew(delay & 0xffff, base + MSC313E_REG_TIMER_MAX_LOW);
66 }
67
68 static unsigned long msc313e_timer_current_value(void __iomem *base)
69 {
70 unsigned long result;
71
72 result = readw(base + MSC313E_REG_COUNTER_LOW);
73 result |= readw(base + MSC313E_REG_COUNTER_HIGH) << 16;
74
75 return result;
76 }
77
78 static int msc313e_timer_clkevt_shutdown(struct clock_event_device *evt)
79 {
80 struct timer_of *timer = to_timer_of(evt);
81
82 msc313e_timer_stop(timer_of_base(timer));
83
84 return 0;
85 }
86
87 static int msc313e_timer_clkevt_set_oneshot(struct clock_event_device *evt)
88 {
89 struct timer_of *timer = to_timer_of(evt);
90
91 msc313e_timer_stop(timer_of_base(timer));
92 msc313e_timer_start(timer_of_base(timer), false);
93
94 return 0;
95 }
96
97 static int msc313e_timer_clkevt_set_periodic(struct clock_event_device *evt)
98 {
99 struct timer_of *timer = to_timer_of(evt);
100
101 msc313e_timer_stop(timer_of_base(timer));
102 msc313e_timer_setup(timer_of_base(timer), timer_of_period(timer));
103 msc313e_timer_start(timer_of_base(timer), true);
104
105 return 0;
106 }
107
108 static int msc313e_timer_clkevt_next_event(unsigned long evt, struct clock_event_device *clkevt)
109 {
110 struct timer_of *timer = to_timer_of(clkevt);
111
112 msc313e_timer_stop(timer_of_base(timer));
113 msc313e_timer_setup(timer_of_base(timer), evt);
114 msc313e_timer_start(timer_of_base(timer), false);
115
116 return 0;
117 }
118
119 static irqreturn_t msc313e_timer_clkevt_irq(int irq, void *dev_id)
120 {
121 struct clock_event_device *evt = dev_id;
122
123 evt->event_handler(evt);
124
125 return IRQ_HANDLED;
126 }
127
128 static u64 msc313e_timer_clksrc_read(struct clocksource *cs)
129 {
130 return msc313e_timer_current_value(msc313e_clksrc) & cs->mask;
131 }
132
133 static unsigned long msc313e_read_delay_timer_read(void)
134 {
135 return msc313e_timer_current_value(msc313e_delay->base);
136 }
137
138 static u64 msc313e_timer_sched_clock_read(void)
139 {
140 return msc313e_timer_current_value(msc313e_clksrc);
141 }
142
143 static int __init msc313e_clkevt_init(struct device_node *np)
144 {
145 int ret;
146
147 msc313e_clkevt = kzalloc(sizeof(struct timer_of), GFP_KERNEL);
148 if (!msc313e_clkevt)
149 return -ENOMEM;
150
151 msc313e_clkevt->flags = TIMER_OF_IRQ | TIMER_OF_CLOCK | TIMER_OF_BASE;
152 msc313e_clkevt->clkevt.name = TIMER_NAME;
153 msc313e_clkevt->clkevt.rating = 300;
154 msc313e_clkevt->clkevt.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
155 msc313e_clkevt->clkevt.set_state_shutdown = msc313e_timer_clkevt_shutdown;
156 msc313e_clkevt->clkevt.set_state_periodic = msc313e_timer_clkevt_set_periodic;
157 msc313e_clkevt->clkevt.set_state_oneshot = msc313e_timer_clkevt_set_oneshot;
158 msc313e_clkevt->clkevt.tick_resume = msc313e_timer_clkevt_shutdown;
159 msc313e_clkevt->clkevt.set_next_event = msc313e_timer_clkevt_next_event;
160 msc313e_clkevt->clkevt.cpumask = cpumask_of(0);
161 msc313e_clkevt->of_irq.handler = msc313e_timer_clkevt_irq;
162
163 ret = timer_of_init(np, msc313e_clkevt);
164 if (ret)
165 goto err_clkevt_kfree;
166
167 msc313e_clkevt->clkevt.irq = msc313e_clkevt->of_irq.irq;
168
169 clockevents_config_and_register(&msc313e_clkevt->clkevt, timer_of_rate(msc313e_clkevt),
170 TIMER_SYNC_TICKS, 0xffffffff);
171 return 0;
172
173 err_clkevt_kfree:
174 kfree(msc313e_clkevt);
175 return ret;
176 }
177
178 static int __init msc313e_clksrc_init(struct device_node *np)
179 {
180 struct timer_of to = { 0 };
181 int ret;
182 u16 reg;
183
184 to.flags = TIMER_OF_BASE | TIMER_OF_CLOCK;
185 ret = timer_of_init(np, &to);
186 if (ret)
187 return ret;
188
189 msc313e_clksrc = timer_of_base(&to);
190 reg = readw(msc313e_clksrc + MSC313E_REG_CTRL);
191 reg |= MSC313E_REG_CTRL_TIMER_EN;
192 writew(reg, msc313e_clksrc + MSC313E_REG_CTRL);
193
194 sched_clock_register(msc313e_timer_sched_clock_read, 32, timer_of_rate(&to));
195 return clocksource_mmio_init(timer_of_base(&to), TIMER_NAME, timer_of_rate(&to), 300, 32,
196 msc313e_timer_clksrc_read);
197 }
198
199 static int __init msc313e_delay_init(struct device_node *np)
200 {
201 struct timer_of to = { 0 };
202 int ret;
203 u16 reg;
204
205 to.flags = TIMER_OF_BASE | TIMER_OF_CLOCK;
206 ret = timer_of_init(np, &to);
207 if (ret)
208 return ret;
209
210 msc313e_delay = kzalloc(sizeof(struct msc313e_delay), GFP_KERNEL);
211 if (!msc313e_delay)
212 return -ENOMEM;
213
214 msc313e_delay->base = timer_of_base(&to);
215 msc313e_delay->delay.read_current_timer = msc313e_read_delay_timer_read;
216 msc313e_delay->delay.freq = timer_of_rate(&to);
217
218 reg = readw(msc313e_delay->base + MSC313E_REG_CTRL);
219 reg |= MSC313E_REG_CTRL_TIMER_EN;
220 writew(reg, msc313e_delay->base + MSC313E_REG_CTRL);
221
> 222 register_current_timer_delay(&msc313e_delay->delay);
223
224 return 0;
225 }
226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:pr/490 9402/15241] sound/soc/sof/intel/byt.c:613:27: error: 'intel_ipc_msg_data' undeclared here (not in a function); did you mean 'sof_ipc_msg_data'?
by kernel test robot
Hi Daniel,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/490
head: e1744bcfc0ba973d84a580a510206e682c10cfcb
commit: f628121dfa77c1af3991c7d0fc91961da65a89bc [9402/15241] LF-3774-1 ASoC: sof: Make Intel IPC stream ops generic
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.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/f628121dfa77c1af3991c7d0fc...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/490
git checkout f628121dfa77c1af3991c7d0fc91961da65a89bc
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash
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 >>):
>> sound/soc/sof/intel/byt.c:613:27: error: 'intel_ipc_msg_data' undeclared here (not in a function); did you mean 'sof_ipc_msg_data'?
613 | .ipc_msg_data = intel_ipc_msg_data,
| ^~~~~~~~~~~~~~~~~~
| sof_ipc_msg_data
>> sound/soc/sof/intel/byt.c:614:27: error: 'intel_ipc_pcm_params' undeclared here (not in a function); did you mean 'sof_ipc_pcm_params'?
614 | .ipc_pcm_params = intel_ipc_pcm_params,
| ^~~~~~~~~~~~~~~~~~~~
| sof_ipc_pcm_params
>> sound/soc/sof/intel/byt.c:628:27: error: 'intel_pcm_open' undeclared here (not in a function)
628 | .pcm_open = intel_pcm_open,
| ^~~~~~~~~~~~~~
>> sound/soc/sof/intel/byt.c:629:27: error: 'intel_pcm_close' undeclared here (not in a function)
629 | .pcm_close = intel_pcm_close,
| ^~~~~~~~~~~~~~~
vim +613 sound/soc/sof/intel/byt.c
9e42c5ca4a276a Liam Girdwood 2019-04-12 584
9e42c5ca4a276a Liam Girdwood 2019-04-12 585 const struct snd_sof_dsp_ops sof_tng_ops = {
9e42c5ca4a276a Liam Girdwood 2019-04-12 586 /* device init */
9e42c5ca4a276a Liam Girdwood 2019-04-12 587 .probe = tangier_pci_probe,
9e42c5ca4a276a Liam Girdwood 2019-04-12 588
9e42c5ca4a276a Liam Girdwood 2019-04-12 589 /* DSP core boot / reset */
9e42c5ca4a276a Liam Girdwood 2019-04-12 590 .run = byt_run,
9e42c5ca4a276a Liam Girdwood 2019-04-12 591 .reset = byt_reset,
9e42c5ca4a276a Liam Girdwood 2019-04-12 592
9e42c5ca4a276a Liam Girdwood 2019-04-12 593 /* Register IO */
9e42c5ca4a276a Liam Girdwood 2019-04-12 594 .write = sof_io_write,
9e42c5ca4a276a Liam Girdwood 2019-04-12 595 .read = sof_io_read,
9e42c5ca4a276a Liam Girdwood 2019-04-12 596 .write64 = sof_io_write64,
9e42c5ca4a276a Liam Girdwood 2019-04-12 597 .read64 = sof_io_read64,
9e42c5ca4a276a Liam Girdwood 2019-04-12 598
9e42c5ca4a276a Liam Girdwood 2019-04-12 599 /* Block IO */
9e42c5ca4a276a Liam Girdwood 2019-04-12 600 .block_read = sof_block_read,
9e42c5ca4a276a Liam Girdwood 2019-04-12 601 .block_write = sof_block_write,
9e42c5ca4a276a Liam Girdwood 2019-04-12 602
9e42c5ca4a276a Liam Girdwood 2019-04-12 603 /* doorbell */
9e42c5ca4a276a Liam Girdwood 2019-04-12 604 .irq_handler = byt_irq_handler,
9e42c5ca4a276a Liam Girdwood 2019-04-12 605 .irq_thread = byt_irq_thread,
9e42c5ca4a276a Liam Girdwood 2019-04-12 606
9e42c5ca4a276a Liam Girdwood 2019-04-12 607 /* ipc */
9e42c5ca4a276a Liam Girdwood 2019-04-12 608 .send_msg = byt_send_msg,
83ee7ab1627b75 Daniel Baluta 2019-08-07 609 .fw_ready = sof_fw_ready,
83ee7ab1627b75 Daniel Baluta 2019-08-07 610 .get_mailbox_offset = byt_get_mailbox_offset,
83ee7ab1627b75 Daniel Baluta 2019-08-07 611 .get_window_offset = byt_get_window_offset,
9e42c5ca4a276a Liam Girdwood 2019-04-12 612
9e42c5ca4a276a Liam Girdwood 2019-04-12 @613 .ipc_msg_data = intel_ipc_msg_data,
9e42c5ca4a276a Liam Girdwood 2019-04-12 @614 .ipc_pcm_params = intel_ipc_pcm_params,
9e42c5ca4a276a Liam Girdwood 2019-04-12 615
285880a23d105e Daniel Baluta 2019-12-04 616 /* machine driver */
285880a23d105e Daniel Baluta 2019-12-04 617 .machine_select = byt_machine_select,
285880a23d105e Daniel Baluta 2019-12-04 618 .machine_register = sof_machine_register,
285880a23d105e Daniel Baluta 2019-12-04 619 .machine_unregister = sof_machine_unregister,
285880a23d105e Daniel Baluta 2019-12-04 620 .set_mach_params = byt_set_mach_params,
285880a23d105e Daniel Baluta 2019-12-04 621
9e42c5ca4a276a Liam Girdwood 2019-04-12 622 /* debug */
9e42c5ca4a276a Liam Girdwood 2019-04-12 623 .debug_map = byt_debugfs,
9e42c5ca4a276a Liam Girdwood 2019-04-12 624 .debug_map_count = ARRAY_SIZE(byt_debugfs),
9e42c5ca4a276a Liam Girdwood 2019-04-12 625 .dbg_dump = byt_dump,
9e42c5ca4a276a Liam Girdwood 2019-04-12 626
9e42c5ca4a276a Liam Girdwood 2019-04-12 627 /* stream callbacks */
9e42c5ca4a276a Liam Girdwood 2019-04-12 @628 .pcm_open = intel_pcm_open,
9e42c5ca4a276a Liam Girdwood 2019-04-12 @629 .pcm_close = intel_pcm_close,
9e42c5ca4a276a Liam Girdwood 2019-04-12 630
9e42c5ca4a276a Liam Girdwood 2019-04-12 631 /* module loading */
9e42c5ca4a276a Liam Girdwood 2019-04-12 632 .load_module = snd_sof_parse_module_memcpy,
9e42c5ca4a276a Liam Girdwood 2019-04-12 633
9e42c5ca4a276a Liam Girdwood 2019-04-12 634 /*Firmware loading */
9e42c5ca4a276a Liam Girdwood 2019-04-12 635 .load_firmware = snd_sof_load_firmware_memcpy,
9e42c5ca4a276a Liam Girdwood 2019-04-12 636
9e42c5ca4a276a Liam Girdwood 2019-04-12 637 /* DAI drivers */
9e42c5ca4a276a Liam Girdwood 2019-04-12 638 .drv = byt_dai,
9e42c5ca4a276a Liam Girdwood 2019-04-12 639 .num_drv = 3, /* we have only 3 SSPs on byt*/
27e322fabd508b Pierre-Louis Bossart 2019-10-24 640
27e322fabd508b Pierre-Louis Bossart 2019-10-24 641 /* ALSA HW info flags */
27e322fabd508b Pierre-Louis Bossart 2019-10-24 642 .hw_info = SNDRV_PCM_INFO_MMAP |
27e322fabd508b Pierre-Louis Bossart 2019-10-24 643 SNDRV_PCM_INFO_MMAP_VALID |
27e322fabd508b Pierre-Louis Bossart 2019-10-24 644 SNDRV_PCM_INFO_INTERLEAVED |
27e322fabd508b Pierre-Louis Bossart 2019-10-24 645 SNDRV_PCM_INFO_PAUSE |
4c02a7bd43e22f Pierre-Louis Bossart 2019-10-24 646 SNDRV_PCM_INFO_BATCH,
0f501c7cde4086 Pierre-Louis Bossart 2019-12-17 647
0f501c7cde4086 Pierre-Louis Bossart 2019-12-17 648 .arch_ops = &sof_xtensa_arch_ops,
9e42c5ca4a276a Liam Girdwood 2019-04-12 649 };
e42b19450866fb Pierre-Louis Bossart 2019-12-17 650 EXPORT_SYMBOL_NS(sof_tng_ops, SND_SOC_SOF_MERRIFIELD);
9e42c5ca4a276a Liam Girdwood 2019-04-12 651
:::::: The code at line 613 was first introduced by commit
:::::: 9e42c5ca4a276a668b11116704f5f0d66ab80608 ASoC: SOF: Intel: Add BYT, CHT and BSW DSP HW support.
:::::: TO: Liam Girdwood <liam.r.girdwood(a)linux.intel.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[hare-scsi-devel:scsi-private.v2 19/21] drivers/scsi/aacraid/linit.c:709:37: error: 'struct scsi_cmnd' has no member named 'request'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head: 915b986531e666d840f72752c597fb6b4ea69d35
commit: e3dcd2298e3f61c338f266efbdccd03b0083a463 [19/21] aacraid: use scsi_host_busy_iter() to traverse outstanding commands
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel scsi-private.v2
git checkout e3dcd2298e3f61c338f266efbdccd03b0083a463
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/aacraid/linit.c: In function 'fib_count_iter':
drivers/scsi/aacraid/linit.c:640:35: error: dereferencing 'void *' pointer [-Werror]
640 | struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
| ^~
drivers/scsi/aacraid/linit.c:640:35: error: request for member 'dev' in something not a structure or union
drivers/scsi/aacraid/linit.c: In function 'aac_eh_abort':
>> drivers/scsi/aacraid/linit.c:709:37: error: 'struct scsi_cmnd' has no member named 'request'
709 | fib = &aac->fibs[cmd->request->tag];
| ^~
drivers/scsi/aacraid/linit.c:776:45: error: 'struct scsi_cmnd' has no member named 'request'
776 | fib = &aac->fibs[cmd->request->tag];
| ^~
drivers/scsi/aacraid/linit.c:790:45: error: 'struct scsi_cmnd' has no member named 'request'
790 | fib = &aac->fibs[cmd->request->tag];
| ^~
drivers/scsi/aacraid/linit.c: In function 'aac_eh_bus_reset_iter':
drivers/scsi/aacraid/linit.c:1010:41: error: 'struct scsi_cmnd' has no member named 'request'
1010 | struct fib *fib = &aac->fibs[cmd->request->tag];
| ^~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from drivers/scsi/aacraid/linit.c:33:
At top level:
arch/arc/include/asm/perf_event.h:126:27: error: 'arc_pmu_cache_map' defined but not used [-Werror=unused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: error: 'arc_pmu_ev_hw_map' defined but not used [-Werror=unused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
drivers/scsi/aacraid/commsup.c: In function 'aac_fib_alloc':
drivers/scsi/aacraid/commsup.c:248:16: error: implicit declaration of function 'scsi_host_get_reserved_cmd'; did you mean 'scsi_host_get_internal_cmd'? [-Werror=implicit-function-declaration]
248 | scmd = scsi_host_get_reserved_cmd(dev->scsi_host_ptr, direction,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| scsi_host_get_internal_cmd
drivers/scsi/aacraid/commsup.c:248:14: error: assignment to 'struct scsi_cmnd *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
248 | scmd = scsi_host_get_reserved_cmd(dev->scsi_host_ptr, direction,
| ^
drivers/scsi/aacraid/commsup.c: In function 'aac_close_sync_fib_iter':
>> drivers/scsi/aacraid/commsup.c:1473:45: error: 'struct scsi_cmnd' has no member named 'request'
1473 | struct fib *fib = &aac->fibs[command->request->tag];
| ^~
cc1: all warnings being treated as errors
vim +709 drivers/scsi/aacraid/linit.c
636
637 static bool fib_count_iter(struct scsi_cmnd *scmnd, void *data, bool reserved)
638 {
639 struct fib_count_data *fib_count = data;
> 640 struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
641
642 if (!fibptr->scmd) {
643 fib_count->llcnt++;
644 return true;
645 }
646 switch (fibptr->owner) {
647 case AAC_OWNER_FIRMWARE:
648 fib_count->fwcnt++;
649 break;
650 case AAC_OWNER_ERROR_HANDLER:
651 fib_count->ehcnt++;
652 break;
653 case AAC_OWNER_MIDLEVEL:
654 fib_count->mlcnt++;
655 break;
656 default:
657 fib_count->krlcnt++;
658 break;
659 }
660 return true;
661 }
662
663 /* Called during SCSI EH, so we don't need to block requests */
664 static int get_num_of_incomplete_fibs(struct aac_dev *aac)
665 {
666 struct Scsi_Host *shost = aac->scsi_host_ptr;
667 struct device *ctrl_dev;
668 struct fib_count_data fcnt = {
669 .dev = aac,
670 };
671
672 scsi_host_busy_iter(shost, fib_count_iter, &fcnt);
673
674 ctrl_dev = &aac->pdev->dev;
675
676 dev_info(ctrl_dev, "outstanding cmd: midlevel-%d\n", fcnt.mlcnt);
677 dev_info(ctrl_dev, "outstanding cmd: lowlevel-%d\n", fcnt.llcnt);
678 dev_info(ctrl_dev, "outstanding cmd: error handler-%d\n", fcnt.ehcnt);
679 dev_info(ctrl_dev, "outstanding cmd: firmware-%d\n", fcnt.fwcnt);
680 dev_info(ctrl_dev, "outstanding cmd: kernel-%d\n", fcnt.krlcnt);
681
682 return fcnt.mlcnt + fcnt.llcnt + fcnt.ehcnt + fcnt.fwcnt;
683 }
684
685 static int aac_eh_abort(struct scsi_cmnd* cmd)
686 {
687 struct scsi_device * dev = cmd->device;
688 struct Scsi_Host * host = dev->host;
689 struct aac_dev * aac = (struct aac_dev *)host->hostdata;
690 struct fib *fib;
691 int count;
692 u32 bus, cid;
693 int ret = FAILED;
694
695 if (aac_adapter_check_health(aac))
696 return ret;
697
698 bus = aac_logical_to_phys(scmd_channel(cmd));
699 cid = scmd_id(cmd);
700 if (aac->hba_map[bus][cid].devtype == AAC_DEVTYPE_NATIVE_RAW) {
701 struct aac_hba_tm_req *tmf;
702 int status;
703 u64 address;
704
705 pr_err("%s: Host adapter abort request (%d,%d,%d,%d)\n",
706 AAC_DRIVERNAME, host->host_no,
707 sdev_channel(dev), sdev_id(dev), (int)dev->lun);
708
> 709 fib = &aac->fibs[cmd->request->tag];
710 if (*(u8 *)fib->hw_fib_va != 0 &&
711 (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA) &&
712 (fib->callback_data == cmd))
713 ret = SUCCESS;
714 if (ret == FAILED)
715 return ret;
716
717 /* start a HBA_TMF_ABORT_TASK TMF request */
718 fib = aac_fib_alloc(aac, DMA_NONE);
719 if (!fib)
720 return ret;
721
722 tmf = (struct aac_hba_tm_req *)fib->hw_fib_va;
723 memset(tmf, 0, sizeof(*tmf));
724 tmf->tmf = HBA_TMF_ABORT_TASK;
725 tmf->it_nexus = aac->hba_map[bus][cid].rmw_nexus;
726 tmf->lun[1] = cmd->device->lun;
727
728 address = (u64)fib->hw_error_pa;
729 tmf->error_ptr_hi = cpu_to_le32((u32)(address >> 32));
730 tmf->error_ptr_lo = cpu_to_le32((u32)(address & 0xffffffff));
731 tmf->error_length = cpu_to_le32(FW_ERROR_BUFFER_SIZE);
732
733 fib->hbacmd_size = sizeof(*tmf);
734 cmd->SCp.sent_command = 0;
735
736 status = aac_hba_send(HBA_IU_TYPE_SCSI_TM_REQ, fib,
737 (fib_callback) aac_hba_callback,
738 (void *) cmd);
739 if (status != -EINPROGRESS) {
740 aac_fib_complete(fib);
741 aac_fib_free(fib);
742 return ret;
743 }
744 /* Wait up to 15 secs for completion */
745 for (count = 0; count < 15; ++count) {
746 if (cmd->SCp.sent_command) {
747 ret = SUCCESS;
748 break;
749 }
750 msleep(1000);
751 }
752
753 if (ret != SUCCESS)
754 pr_err("%s: Host adapter abort request timed out\n",
755 AAC_DRIVERNAME);
756 } else {
757 pr_err(
758 "%s: Host adapter abort request.\n"
759 "%s: Outstanding commands on (%d,%d,%d,%d):\n",
760 AAC_DRIVERNAME, AAC_DRIVERNAME,
761 host->host_no, sdev_channel(dev), sdev_id(dev),
762 (int)dev->lun);
763 switch (cmd->cmnd[0]) {
764 case SERVICE_ACTION_IN_16:
765 if (!(aac->raw_io_interface) ||
766 !(aac->raw_io_64) ||
767 ((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
768 break;
769 fallthrough;
770 case INQUIRY:
771 case READ_CAPACITY:
772 /*
773 * Mark associated FIB to not complete,
774 * eh handler does this
775 */
776 fib = &aac->fibs[cmd->request->tag];
777 if (fib->hw_fib_va->header.XferState &&
778 (fib->flags & FIB_CONTEXT_FLAG) &&
779 (fib->callback_data == cmd)) {
780 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
781 fib->owner = AAC_OWNER_ERROR_HANDLER;
782 ret = SUCCESS;
783 }
784 break;
785 case TEST_UNIT_READY:
786 /*
787 * Mark associated FIB to not complete,
788 * eh handler does this
789 */
790 fib = &aac->fibs[cmd->request->tag];
791 if ((fib->hw_fib_va->header.XferState &
792 cpu_to_le32(Async | NoResponseExpected)) &&
793 (fib->flags & FIB_CONTEXT_FLAG) &&
794 (fib->callback_data == cmd)) {
795 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
796 fib->owner = AAC_OWNER_ERROR_HANDLER;
797 ret = SUCCESS;
798 }
799 break;
800 }
801 }
802 return ret;
803 }
804
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[zanussi-trace:ftrace/cleanup-hist-func-v2 2/2] kernel/trace/trace_events_trigger.c:797:26: warning: variable 'trigger_ops' is uninitialized when used here
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Tom Zanussi <zanussi(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/zanussi/linux-trace.git ftrace/cleanup-hist-func-v2
head: 84eb6a8a61565e308b9908cbc63a897fde300c57
commit: 84eb6a8a61565e308b9908cbc63a897fde300c57 [2/2] tracing: Have existing event_command implementations use helpers
config: riscv-buildonly-randconfig-r004-20211113 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/zanussi/linux-trace.git/c...
git remote add zanussi-trace https://git.kernel.org/pub/scm/linux/kernel/git/zanussi/linux-trace.git
git fetch --no-tags zanussi-trace ftrace/cleanup-hist-func-v2
git checkout 84eb6a8a61565e308b9908cbc63a897fde300c57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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 >>):
>> ld.lld: error: arch/riscv/built-in.a(kernel/ptrace.o):(function __traceiter_sys_exit: .text+0x9a): relocation R_RISCV_HI20 out of range: 531906 is not in [-524288, 524287]; references __tracepoint_sys_exit
>>> referenced by ptrace.c
>>> defined in arch/riscv/built-in.a(kernel/ptrace.o)
--
>> ld.lld: error: arch/riscv/built-in.a(kernel/signal.o):(function sys_rt_sigreturn: .text+0x1c): relocation R_RISCV_HI20 out of range: 524323 is not in [-524288, 524287]; references do_no_restart_syscall
>>> referenced by signal.c
>>> defined in kernel/built-in.a(signal.o)
--
>> ld.lld: error: kernel/built-in.a(fork.o):(function __traceiter_task_newtask: .text+0x1a): relocation R_RISCV_HI20 out of range: 531906 is not in [-524288, 524287]; references __tracepoint_task_newtask
>>> referenced by fork.c
>>> defined in kernel/built-in.a(fork.o)
--
In file included from kernel/trace/trace_events_trigger.c:15:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:22:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from kernel/trace/trace_events_trigger.c:15:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:22:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from kernel/trace/trace_events_trigger.c:15:
In file included from kernel/trace/trace.h:9:
In file included from include/linux/clocksource.h:22:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> kernel/trace/trace_events_trigger.c:797:26: warning: variable 'trigger_ops' is uninitialized when used here [-Wuninitialized]
cmd_ops->unreg(glob+1, trigger_ops, trigger_data, file);
^~~~~~~~~~~
kernel/trace/trace_events_trigger.c:782:39: note: initialize the variable 'trigger_ops' to silence this warning
struct event_trigger_ops *trigger_ops;
^
= NULL
8 warnings generated.
vim +/trigger_ops +797 kernel/trace/trace_events_trigger.c
2b228845d7aa04 Tom Zanussi 2021-11-05 759
2a2df321158817 Tom Zanussi 2013-10-24 760 /**
2a2df321158817 Tom Zanussi 2013-10-24 761 * event_trigger_callback - Generic event_command @func implementation
2a2df321158817 Tom Zanussi 2013-10-24 762 * @cmd_ops: The command ops, used for trigger registration
7f1d2f8210195c Steven Rostedt (Red Hat 2015-05-05 763) * @file: The trace_event_file associated with the event
2a2df321158817 Tom Zanussi 2013-10-24 764 * @glob: The raw string used to register the trigger
2a2df321158817 Tom Zanussi 2013-10-24 765 * @cmd: The cmd portion of the string used to register the trigger
2a2df321158817 Tom Zanussi 2013-10-24 766 * @param: The params portion of the string used to register the trigger
2a2df321158817 Tom Zanussi 2013-10-24 767 *
2a2df321158817 Tom Zanussi 2013-10-24 768 * Common implementation for event command parsing and trigger
2a2df321158817 Tom Zanussi 2013-10-24 769 * instantiation.
2a2df321158817 Tom Zanussi 2013-10-24 770 *
2a2df321158817 Tom Zanussi 2013-10-24 771 * Usually used directly as the @func method in event command
2a2df321158817 Tom Zanussi 2013-10-24 772 * implementations.
2a2df321158817 Tom Zanussi 2013-10-24 773 *
2a2df321158817 Tom Zanussi 2013-10-24 774 * Return: 0 on success, errno otherwise
2a2df321158817 Tom Zanussi 2013-10-24 775 */
2a2df321158817 Tom Zanussi 2013-10-24 776 static int
2a2df321158817 Tom Zanussi 2013-10-24 777 event_trigger_callback(struct event_command *cmd_ops,
7f1d2f8210195c Steven Rostedt (Red Hat 2015-05-05 778) struct trace_event_file *file,
2a2df321158817 Tom Zanussi 2013-10-24 779 char *glob, char *cmd, char *param)
2a2df321158817 Tom Zanussi 2013-10-24 780 {
2a2df321158817 Tom Zanussi 2013-10-24 781 struct event_trigger_data *trigger_data;
2a2df321158817 Tom Zanussi 2013-10-24 782 struct event_trigger_ops *trigger_ops;
2a2df321158817 Tom Zanussi 2013-10-24 783 char *trigger = NULL;
84eb6a8a61565e Tom Zanussi 2021-11-05 784 bool remove;
2a2df321158817 Tom Zanussi 2013-10-24 785 int ret;
2a2df321158817 Tom Zanussi 2013-10-24 786
84eb6a8a61565e Tom Zanussi 2021-11-05 787 ret = event_trigger_check(glob, &trigger, ¶m, &remove, false, true);
84eb6a8a61565e Tom Zanussi 2021-11-05 788 if (ret)
84eb6a8a61565e Tom Zanussi 2021-11-05 789 return ret;
2a2df321158817 Tom Zanussi 2013-10-24 790
2a2df321158817 Tom Zanussi 2013-10-24 791 ret = -ENOMEM;
84eb6a8a61565e Tom Zanussi 2021-11-05 792 trigger_data = event_trigger_alloc(cmd_ops, trigger, cmd, file);
2a2df321158817 Tom Zanussi 2013-10-24 793 if (!trigger_data)
2a2df321158817 Tom Zanussi 2013-10-24 794 goto out;
2a2df321158817 Tom Zanussi 2013-10-24 795
84eb6a8a61565e Tom Zanussi 2021-11-05 796 if (remove) {
2a2df321158817 Tom Zanussi 2013-10-24 @797 cmd_ops->unreg(glob+1, trigger_ops, trigger_data, file);
2a2df321158817 Tom Zanussi 2013-10-24 798 ret = 0;
2a2df321158817 Tom Zanussi 2013-10-24 799 goto out;
2a2df321158817 Tom Zanussi 2013-10-24 800 }
2a2df321158817 Tom Zanussi 2013-10-24 801
84eb6a8a61565e Tom Zanussi 2021-11-05 802 ret = event_trigger_parse_num(trigger, trigger_data);
2a2df321158817 Tom Zanussi 2013-10-24 803 if (ret)
2a2df321158817 Tom Zanussi 2013-10-24 804 goto out_free;
2a2df321158817 Tom Zanussi 2013-10-24 805
84eb6a8a61565e Tom Zanussi 2021-11-05 806 ret = event_trigger_set_filter(cmd_ops, file, param, trigger_data);
2a2df321158817 Tom Zanussi 2013-10-24 807 if (ret < 0)
2a2df321158817 Tom Zanussi 2013-10-24 808 goto out_free;
2a2df321158817 Tom Zanussi 2013-10-24 809
1863c387259b62 Steven Rostedt (VMware 2018-07-24 810) /* Up the trigger_data count to make sure reg doesn't free it on failure */
1863c387259b62 Steven Rostedt (VMware 2018-07-24 811) event_trigger_init(trigger_ops, trigger_data);
84eb6a8a61565e Tom Zanussi 2021-11-05 812
84eb6a8a61565e Tom Zanussi 2021-11-05 813 ret = event_trigger_register(cmd_ops, file, glob, cmd, trigger, trigger_data, NULL);
84eb6a8a61565e Tom Zanussi 2021-11-05 814 if (ret)
84eb6a8a61565e Tom Zanussi 2021-11-05 815 goto out_free;
1863c387259b62 Steven Rostedt (VMware 2018-07-24 816)
1863c387259b62 Steven Rostedt (VMware 2018-07-24 817) /* Down the counter of trigger_data or free it if not used anymore */
1863c387259b62 Steven Rostedt (VMware 2018-07-24 818) event_trigger_free(trigger_ops, trigger_data);
2a2df321158817 Tom Zanussi 2013-10-24 819 out:
2a2df321158817 Tom Zanussi 2013-10-24 820 return ret;
2a2df321158817 Tom Zanussi 2013-10-24 821 out_free:
84eb6a8a61565e Tom Zanussi 2021-11-05 822 event_trigger_reset_filter(cmd_ops, trigger_data);
2a2df321158817 Tom Zanussi 2013-10-24 823 kfree(trigger_data);
2a2df321158817 Tom Zanussi 2013-10-24 824 goto out;
2a2df321158817 Tom Zanussi 2013-10-24 825 }
2a2df321158817 Tom Zanussi 2013-10-24 826
:::::: The code at line 797 was first introduced by commit
:::::: 2a2df321158817811c5dc206dce808e0aa9f6d89 tracing: Add 'traceon' and 'traceoff' event trigger commands
:::::: TO: Tom Zanussi <tom.zanussi(a)linux.intel.com>
:::::: CC: Steven Rostedt <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[freescale-fslc:pr/490 11385/15241] drivers/regulator/scmi-regulator.c:237:19: error: 'struct regulator_desc' has no member named 'of_match_full_name'
by kernel test robot
Hi Cristian,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/490
head: e1744bcfc0ba973d84a580a510206e682c10cfcb
commit: 367122823dab7b07ad76fb94a06c7a3030fe57b6 [11385/15241] regulator: add SCMI driver
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/367122823dab7b07ad76fb94a0...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/490
git checkout 367122823dab7b07ad76fb94a06c7a3030fe57b6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/regulator/scmi-regulator.c: In function 'scmi_regulator_common_init':
>> drivers/regulator/scmi-regulator.c:237:19: error: 'struct regulator_desc' has no member named 'of_match_full_name'
237 | sreg->desc.of_match_full_name = true;
| ^
vim +237 drivers/regulator/scmi-regulator.c
203
204 static int scmi_regulator_common_init(struct scmi_regulator *sreg)
205 {
206 int ret;
207 const struct scmi_handle *handle = sreg->sdev->handle;
208 struct device *dev = &sreg->sdev->dev;
209 const struct scmi_voltage_info *vinfo;
210
211 vinfo = handle->voltage_ops->info_get(handle, sreg->id);
212 if (!vinfo) {
213 dev_warn(dev, "Failure to get voltage domain %d\n",
214 sreg->id);
215 return -ENODEV;
216 }
217
218 /*
219 * Regulator framework does not fully support negative voltages
220 * so we discard any voltage domain reported as supporting negative
221 * voltages: as a consequence each levels_uv entry is guaranteed to
222 * be non-negative from here on.
223 */
224 if (vinfo->negative_volts_allowed) {
225 dev_warn(dev, "Negative voltages NOT supported...skip %s\n",
226 sreg->of_node->full_name);
227 return -EOPNOTSUPP;
228 }
229
230 sreg->desc.name = devm_kasprintf(dev, GFP_KERNEL, "%s", vinfo->name);
231 if (!sreg->desc.name)
232 return -ENOMEM;
233
234 sreg->desc.id = sreg->id;
235 sreg->desc.type = REGULATOR_VOLTAGE;
236 sreg->desc.owner = THIS_MODULE;
> 237 sreg->desc.of_match_full_name = true;
238 sreg->desc.of_match = sreg->of_node->full_name;
239 sreg->desc.regulators_node = "regulators";
240 if (vinfo->segmented)
241 ret = scmi_config_linear_regulator_mappings(sreg, vinfo);
242 else
243 ret = scmi_config_discrete_regulator_mappings(sreg, vinfo);
244 if (ret)
245 return ret;
246
247 /*
248 * Using the scmi device here to have DT searched from Voltage
249 * protocol node down.
250 */
251 sreg->conf.dev = dev;
252
253 /* Store for later retrieval via rdev_get_drvdata() */
254 sreg->conf.driver_data = sreg;
255
256 return 0;
257 }
258
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[android-common:android-4.14-stable 16585/25399] kernel/bpf/core.c:1532:34: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.14-stable
head: 608fa6223455f800d8752a8a8ca18c05a9a14057
commit: 5179a6a673e1bff5b9823b1317c59127bacd4641 [16585/25399] UPSTREAM: bpf: permit multiple bpf attachments for a single perf event
config: i386-randconfig-s001-20211019 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.14-stable
git checkout 5179a6a673e1bff5b9823b1317c59127bacd4641
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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 >>)
kernel/bpf/core.c:1095:43: sparse: sparse: arithmetics on pointers to functions
kernel/bpf/core.c:1514:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct bpf_prog_array [noderef] <asn:4> * @@ got void * @@
kernel/bpf/core.c:1514:31: sparse: expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1514:31: sparse: got void *
kernel/bpf/core.c:1518:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct bpf_prog_array [noderef] <asn:4> * @@ got struct bpf_prog_array * @@
kernel/bpf/core.c:1518:17: sparse: expected struct bpf_prog_array [noderef] <asn:4> *
kernel/bpf/core.c:1518:17: sparse: got struct bpf_prog_array *
kernel/bpf/core.c:1526:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct callback_head *head @@ got struct callback_head [noderef] <asn:4> * @@
kernel/bpf/core.c:1526:9: sparse: expected struct callback_head *head
kernel/bpf/core.c:1526:9: sparse: got struct callback_head [noderef] <asn:4> *
>> kernel/bpf/core.c:1532:34: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct bpf_prog **prog @@ got struct bpf_prog *[noderef] <asn:4> * @@
kernel/bpf/core.c:1532:34: sparse: expected struct bpf_prog **prog
kernel/bpf/core.c:1532:34: sparse: got struct bpf_prog *[noderef] <asn:4> *
>> kernel/bpf/core.c:1555:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bpf_prog **existing_prog @@ got struct bpf_prog *[noderef] <asn:4> * @@
kernel/bpf/core.c:1555:31: sparse: expected struct bpf_prog **existing_prog
kernel/bpf/core.c:1555:31: sparse: got struct bpf_prog *[noderef] <asn:4> *
>> kernel/bpf/core.c:1577:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bpf_prog_array *array @@ got struct bpf_prog_array [noderef] <asn:4> * @@
kernel/bpf/core.c:1577:15: sparse: expected struct bpf_prog_array *array
kernel/bpf/core.c:1577:15: sparse: got struct bpf_prog_array [noderef] <asn:4> *
>> kernel/bpf/core.c:1583:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct bpf_prog **[assigned] existing_prog @@ got struct bpf_prog *[noderef] <asn:4> * @@
kernel/bpf/core.c:1583:31: sparse: expected struct bpf_prog **[assigned] existing_prog
kernel/bpf/core.c:1583:31: sparse: got struct bpf_prog *[noderef] <asn:4> *
vim +1532 kernel/bpf/core.c
1528
1529 void bpf_prog_array_delete_safe(struct bpf_prog_array __rcu *progs,
1530 struct bpf_prog *old_prog)
1531 {
> 1532 struct bpf_prog **prog = progs->progs;
1533
1534 for (; *prog; prog++)
1535 if (*prog == old_prog) {
1536 WRITE_ONCE(*prog, &dummy_bpf_prog.prog);
1537 break;
1538 }
1539 }
1540
1541 int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array,
1542 struct bpf_prog *exclude_prog,
1543 struct bpf_prog *include_prog,
1544 struct bpf_prog_array **new_array)
1545 {
1546 int new_prog_cnt, carry_prog_cnt = 0;
1547 struct bpf_prog **existing_prog;
1548 struct bpf_prog_array *array;
1549 int new_prog_idx = 0;
1550
1551 /* Figure out how many existing progs we need to carry over to
1552 * the new array.
1553 */
1554 if (old_array) {
> 1555 existing_prog = old_array->progs;
1556 for (; *existing_prog; existing_prog++) {
1557 if (*existing_prog != exclude_prog &&
1558 *existing_prog != &dummy_bpf_prog.prog)
1559 carry_prog_cnt++;
1560 if (*existing_prog == include_prog)
1561 return -EEXIST;
1562 }
1563 }
1564
1565 /* How many progs (not NULL) will be in the new array? */
1566 new_prog_cnt = carry_prog_cnt;
1567 if (include_prog)
1568 new_prog_cnt += 1;
1569
1570 /* Do we have any prog (not NULL) in the new array? */
1571 if (!new_prog_cnt) {
1572 *new_array = NULL;
1573 return 0;
1574 }
1575
1576 /* +1 as the end of prog_array is marked with NULL */
> 1577 array = bpf_prog_array_alloc(new_prog_cnt + 1, GFP_KERNEL);
1578 if (!array)
1579 return -ENOMEM;
1580
1581 /* Fill in the new prog array */
1582 if (carry_prog_cnt) {
> 1583 existing_prog = old_array->progs;
1584 for (; *existing_prog; existing_prog++)
1585 if (*existing_prog != exclude_prog &&
1586 *existing_prog != &dummy_bpf_prog.prog)
1587 array->progs[new_prog_idx++] = *existing_prog;
1588 }
1589 if (include_prog)
1590 array->progs[new_prog_idx++] = include_prog;
1591 array->progs[new_prog_idx] = NULL;
1592 *new_array = array;
1593 return 0;
1594 }
1595
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week