* [openeuler:OLK-6.6 3557/3557] drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c:43:35: sparse: sparse: cast to restricted __le16
@ 2025-12-21 16:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-12-21 16:29 UTC (permalink / raw)
To: kernel, Ze Zuo; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 04473ee9ed912a16fff0d8846ad565bbf3d63c77
commit: b8a759002c48f227d03084fb6b6213a3beaa44e3 [3557/3557] mm_monitor/mm_spe: Introduce standalone SPE profiling framework
config: arm64-randconfig-r132-20251218 (https://download.01.org/0day-ci/archive/20251222/202512220002.7l3mjSAD-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251222/202512220002.7l3mjSAD-lkp@intel.com/reproduce)
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/202512220002.7l3mjSAD-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
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-21 16:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-21 16:29 [openeuler:OLK-6.6 3557/3557] drivers/arm/mm_monitor/spe-decoder/arm-spe-pkt-decoder.c:43:35: sparse: sparse: cast to restricted __le16 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.