From: Nathan Chancellor <natechancel...@gmail.com> Sent: Thursday, October 04, 2018 7:39 PM
> Clang warns when one enumerated type is implicitly converted to another. > > drivers/net/ethernet/qlogic/qed/qed_ll2.c:799:32: warning: implicit > conversion from enumeration type 'enum core_tx_dest' to different > enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion] > tx_pkt.tx_dest = p_ll2_conn->tx_dest; > ~ ~~~~~~~~~~~~^~~~~~~ > 1 warning generated. > > Fix this by using a switch statement to convert between the enumerated > values since they are not 1 to 1, which matches how the rest of the > driver handles this conversion. > > Link: https://github.com/ClangBuiltLinux/linux/issues/125 > Suggested-by: Tomer Tayar <tomer.ta...@cavium.com> > Signed-off-by: Nathan Chancellor <natechancel...@gmail.com> > --- > > v1 -> v2: > > * Use an explicit switch statement to convert between the enumerated > types like the rest of the driver, as suggested by Tomer. Thanks Acked-by: Tomer Tayar <tomer.ta...@cavium.com>