* [openeuler:OLK-6.6 6913/7311] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6003:37: sparse: sparse: restricted __le32 degrades to integer
@ 2024-04-08 21:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-08 21:24 UTC (permalink / raw)
To: kernel, Jiantao Xiao; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 05607873db411ec3c614313b43cec60138c26a99
commit: e992b88fa60f2e405a35c281c549b4caf3cd78f3 [6913/7311] net: hns3: support set/get VxLAN rule of rx flow director by ethtool
config: loongarch-randconfig-r113-20240408 (https://download.01.org/0day-ci/archive/20240409/202404090532.QLIDcYg8-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240409/202404090532.QLIDcYg8-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/202404090532.QLIDcYg8-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6003:37: sparse: sparse: restricted __le32 degrades to integer
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6004:37: sparse: sparse: restricted __le32 degrades to integer
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6238:17: sparse: sparse: restricted __be32 degrades to integer
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6332:17: sparse: sparse: restricted __be32 degrades to integer
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:13360:21: sparse: sparse: symbol 'hclge_ops' was not declared. Should it be static?
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/slab.h, ...):
include/linux/page-flags.h:245:46: sparse: sparse: self-comparison always evaluates to false
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5574:31: sparse: sparse: context imbalance in 'hclge_sync_fd_user_def_cfg' - unexpected unlock
vim +6003 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
5945
5946 int offset, moffset, ip_offset;
5947 enum HCLGE_FD_KEY_OPT key_opt;
5948 u16 tmp_x_s, tmp_y_s;
5949 u32 tmp_x_l, tmp_y_l;
5950 u8 *p = (u8 *)rule;
5951 int i;
5952
5953 if (rule->unused_tuple & BIT(tuple_bit))
5954 return true;
5955
5956 key_opt = tuple_key_info[tuple_bit].key_opt;
5957 offset = tuple_key_info[tuple_bit].offset;
5958 moffset = tuple_key_info[tuple_bit].moffset;
5959
5960 switch (key_opt) {
5961 case KEY_OPT_U8:
5962 calc_x(*key_x, p[offset], p[moffset]);
5963 calc_y(*key_y, p[offset], p[moffset]);
5964
5965 return true;
5966 case KEY_OPT_LE16:
5967 calc_x(tmp_x_s, *(u16 *)(&p[offset]), *(u16 *)(&p[moffset]));
5968 calc_y(tmp_y_s, *(u16 *)(&p[offset]), *(u16 *)(&p[moffset]));
5969 *(__le16 *)key_x = cpu_to_le16(tmp_x_s);
5970 *(__le16 *)key_y = cpu_to_le16(tmp_y_s);
5971
5972 return true;
5973 case KEY_OPT_LE32:
5974 calc_x(tmp_x_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset]));
5975 calc_y(tmp_y_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset]));
5976 *(__le32 *)key_x = cpu_to_le32(tmp_x_l);
5977 *(__le32 *)key_y = cpu_to_le32(tmp_y_l);
5978
5979 return true;
5980 case KEY_OPT_MAC:
5981 for (i = 0; i < ETH_ALEN; i++) {
5982 calc_x(key_x[ETH_ALEN - 1 - i], p[offset + i],
5983 p[moffset + i]);
5984 calc_y(key_y[ETH_ALEN - 1 - i], p[offset + i],
5985 p[moffset + i]);
5986 }
5987
5988 return true;
5989 case KEY_OPT_IP:
5990 ip_offset = IPV4_INDEX * sizeof(u32);
5991 calc_x(tmp_x_l, *(u32 *)(&p[offset + ip_offset]),
5992 *(u32 *)(&p[moffset + ip_offset]));
5993 calc_y(tmp_y_l, *(u32 *)(&p[offset + ip_offset]),
5994 *(u32 *)(&p[moffset + ip_offset]));
5995 *(__le32 *)key_x = cpu_to_le32(tmp_x_l);
5996 *(__le32 *)key_y = cpu_to_le32(tmp_y_l);
5997
5998 return true;
5999 case KEY_OPT_VNI:
6000 calc_x(tmp_x_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset]));
6001 calc_y(tmp_y_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset]));
6002 for (i = 0; i < HCLGE_VNI_LENGTH; i++) {
> 6003 key_x[i] = (cpu_to_le32(tmp_x_l) >> (i * BITS_PER_BYTE)) & 0xFF;
6004 key_y[i] = (cpu_to_le32(tmp_y_l) >> (i * BITS_PER_BYTE)) & 0xFF;
6005 }
6006 return true;
6007 default:
6008 return false;
6009 }
6010 }
6011
--
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:[~2024-04-08 21:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 21:24 [openeuler:OLK-6.6 6913/7311] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6003:37: sparse: sparse: restricted __le32 degrades to integer 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.