[openeuler:OLK-6.6 2357/2357] drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c:43:35: sparse: sparse: cast to restricted __le16

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: a9e6ec001662a376522f36604dfec47c30530549 commit: b8a759002c48f227d03084fb6b6213a3beaa44e3 [2357/2357] mm_monitor/mm_spe: Introduce standalone SPE profiling framework config: arm64-randconfig-r123-20250605 (https://download.01.org/0day-ci/archive/20250605/202506050822.mELNZxno-lkp@i...) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250605/202506050822.mELNZxno-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506050822.mELNZxno-lkp@intel.com/ sparse warnings: (new ones prefixed by >>)
drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c:43:35: sparse: sparse: cast to restricted __le16 drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c:46:35: sparse: sparse: cast to restricted __le32 drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c:49:35: sparse: sparse: cast to restricted __le64 -- drivers/arm/mm_monitor/mm_spe.c:35:1: sparse: sparse: symbol '__pcpu_scope_per_cpu_spe_buf' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:259:5: sparse: sparse: symbol 'mm_spe_start' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:294:6: sparse: sparse: symbol 'mm_spe_continue' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:306:6: sparse: sparse: symbol 'mm_spe_stop' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:311:6: sparse: sparse: symbol 'mm_spe_decoding' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:319:19: sparse: sparse: symbol 'mm_spe_getbuf_addr' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:326:5: sparse: sparse: symbol 'mm_spe_getnum_record' was not declared. Should it be static? drivers/arm/mm_monitor/mm_spe.c:339:5: sparse: sparse: symbol 'mm_spe_enabled' was not declared. Should it be static?
vim +43 drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c 26 27 static int arm_spe_get_payload(const unsigned char *buf, size_t len, 28 unsigned char ext_hdr, 29 struct arm_spe_pkt *packet) 30 { 31 size_t payload_len = arm_spe_payload_len(buf[ext_hdr]); 32 33 if (len < 1 + ext_hdr + payload_len) 34 return ARM_SPE_NEED_MORE_BYTES; 35 36 buf += 1 + ext_hdr; 37 38 switch (payload_len) { 39 case 1: 40 packet->payload = *(uint8_t *)buf; 41 break; 42 case 2:
43 packet->payload = le16_to_cpu(*(uint16_t *)buf); 44 break; 45 case 4: 46 packet->payload = le32_to_cpu(*(uint32_t *)buf); 47 break; 48 case 8: 49 packet->payload = le64_to_cpu(*(uint64_t *)buf); 50 break; 51 default: 52 return ARM_SPE_BAD_PACKET; 53 } 54 55 return 1 + ext_hdr + payload_len; 56 } 57
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot