tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c6c7d83d2bc788cd9aef8983afa59eae25e148e commit: 92e27ee40a7ac6d7716ce01305906610e50f577a [6911/9610] net: hns3: add support handling tx dhcp packets for ROH config: arm64-randconfig-r132-20240515 (https://download.01.org/0day-ci/archive/20240515/202405151226.9E443DSy-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240515/202405151226.9E443DSy-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/202405151226.9E443DSy-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:1182:29: sparse: sparse: restricted __be32 degrades to integer
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...): include/linux/page-flags.h:245:46: sparse: sparse: self-comparison always evaluates to false
vim +1182 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1165 1166 static struct hns3_dhcp_packet *hns3_get_dhcp_packet(struct sk_buff *skb, 1167 int *dhcp_len) 1168 { 1169 struct hns3_dhcp_packet *dhcp; 1170 union l4_hdr_info l4; 1171 int l4_payload_len; 1172 1173 l4.hdr = skb_transport_header(skb); 1174 if (l4.udp->dest != htons(HNS3_DHCP_CLIENT_PORT) || 1175 l4.udp->source != htons(HNS3_DHCP_SERVER_PORT)) 1176 return NULL; 1177 1178 dhcp = (struct hns3_dhcp_packet *)(l4.hdr + sizeof(struct udphdr)); 1179 l4_payload_len = ntohs(l4.udp->len) - sizeof(struct udphdr); 1180 if (l4_payload_len < offsetof(struct hns3_dhcp_packet, options) || 1181 dhcp->hlen != ETH_ALEN ||
1182 dhcp->cookie != htonl(HNS3_DHCP_MAGIC))
1183 return NULL; 1184 1185 *dhcp_len = l4_payload_len; 1186 return dhcp; 1187 } 1188