From 87dbbdb120a7f6a5d5be07f122ba2f83655dcb2b Mon Sep 17 00:00:00 2001 From: Ziyang Xuan Date: Tue, 16 Jul 2019 11:59:28 +0800 Subject: [PATCH] net/hinic: fix implicit downcast of bitfield There are some implicit downcast errors in TX offload information parsing by lgtm tool. This patch is to solve these errors. Fixes: 64727024d2fd ("net/hinic: add device initialization") Signed-off-by: Ziyang Xuan --- drivers/net/hinic/hinic_pmd_tx.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/hinic/hinic_pmd_tx.h b/drivers/net/hinic/hinic_pmd_tx.h index 8b361cf9fa..8a3df27d5a 100644 --- a/drivers/net/hinic/hinic_pmd_tx.h +++ b/drivers/net/hinic/hinic_pmd_tx.h @@ -29,19 +29,20 @@ enum sq_wqe_type { struct hinic_tx_offload_info { u8 outer_l2_len; u8 outer_l3_type; - u8 outer_l3_len; + u16 outer_l3_len; u8 inner_l2_len; u8 inner_l3_type; - u8 inner_l3_len; + u16 inner_l3_len; u8 tunnel_length; u8 tunnel_type; u8 inner_l4_type; u8 inner_l4_len; - u8 payload_offset; + u16 payload_offset; u8 inner_l4_tcp_udp; + u8 rsvd0; }; /* tx sge info */ -- 2.20.1