Skip to content

Commit 6e29464

Browse files
nathanchancedavem330
authored andcommitted
hinic: Fix l4_type parameter in hinic_task_set_tunnel_l4
Clang warns: drivers/net/ethernet/huawei/hinic/hinic_tx.c:392:34: error: implicit conversion from enumeration type 'enum hinic_l4_tunnel_type' to different enumeration type 'enum hinic_l4_offload_type' [-Werror,-Wenum-conversion] hinic_task_set_tunnel_l4(task, TUNNEL_UDP_NO_CSUM, ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~ 1 error generated. It seems that hinic_task_set_tunnel_l4 was meant to take an enum of type hinic_l4_tunnel_type, not hinic_l4_offload_type, given both the name of the functions and the values used. Fixes: cc18a75 ("net-next/hinic: add checksum offload and TSO support") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e2d00e6 commit 6e29464

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ void hinic_task_set_inner_l3(struct hinic_sq_task *task,
532532
}
533533

534534
void hinic_task_set_tunnel_l4(struct hinic_sq_task *task,
535-
enum hinic_l4_offload_type l4_type,
535+
enum hinic_l4_tunnel_type l4_type,
536536
u32 tunnel_len)
537537
{
538538
task->pkt_info2 |= HINIC_SQ_TASK_INFO2_SET(l4_type, TUNNEL_L4TYPE) |

drivers/net/ethernet/huawei/hinic/hinic_hw_qp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void hinic_task_set_inner_l3(struct hinic_sq_task *task,
160160
u32 network_len);
161161

162162
void hinic_task_set_tunnel_l4(struct hinic_sq_task *task,
163-
enum hinic_l4_offload_type l4_type,
163+
enum hinic_l4_tunnel_type l4_type,
164164
u32 tunnel_len);
165165

166166
void hinic_set_cs_inner_l4(struct hinic_sq_task *task,

0 commit comments

Comments
 (0)