Skip to content

Commit 85d1c1a

Browse files
Duanqiang Wenopsiff
authored andcommitted
deepin: net: txgbe: fix clang compile error
wangxun inclusion category: bugfix fix clang [-Werror,-Wimplicit-fallthrough] and [-Werror,-Wbitwise-instead-of-logical] compile error. Signed-off-by: Duanqiang Wen <duanqiangwen@net-swift.com>
1 parent dd25bad commit 85d1c1a

6 files changed

Lines changed: 20 additions & 13 deletions

File tree

drivers/net/ethernet/wangxun/txgbe/txgbe_e56.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3296,7 +3296,7 @@ static int txgbe_e56_disable_rx40G(struct txgbe_hw *hw)
32963296
unsigned int rdata, timer;
32973297
unsigned int addr, temp;
32983298
int i;
3299-
struct txgbe_adapter *adapter;
3299+
struct txgbe_adapter *adapter = hw->back;
33003300

33013301
for (i = 0; i < 4; i++) {
33023302
//1. Disable OVERRIDE on below aliases

drivers/net/ethernet/wangxun/txgbe/txgbe_e56_bp.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,20 +334,20 @@ static int txgbe_e56_rxs_post_cdr_lock_temp_track_seq(struct txgbe_adapter *adap
334334
int FINE_CODE;
335335
int ULTRAFINE_CODE;
336336

337-
int CMVAR_SEC_LOW_TH;
337+
int CMVAR_SEC_LOW_TH = 0;
338338
int CMVAR_UFINE_MAX = 0;
339-
int CMVAR_FINE_MAX;
339+
int CMVAR_FINE_MAX = 0;
340340
int CMVAR_UFINE_UMAX_WRAP = 0;
341-
int CMVAR_COARSE_MAX;
341+
int CMVAR_COARSE_MAX = 0;
342342
int CMVAR_UFINE_FMAX_WRAP = 0;
343343
int CMVAR_FINE_FMAX_WRAP = 0;
344-
int CMVAR_SEC_HIGH_TH;
345-
int CMVAR_UFINE_MIN;
346-
int CMVAR_FINE_MIN;
347-
int CMVAR_UFINE_UMIN_WRAP;
348-
int CMVAR_COARSE_MIN;
349-
int CMVAR_UFINE_FMIN_WRAP;
350-
int CMVAR_FINE_FMIN_WRAP;
344+
int CMVAR_SEC_HIGH_TH = 0;
345+
int CMVAR_UFINE_MIN = 0;
346+
int CMVAR_FINE_MIN = 0;
347+
int CMVAR_UFINE_UMIN_WRAP = 0;
348+
int CMVAR_COARSE_MIN = 0;
349+
int CMVAR_UFINE_FMIN_WRAP = 0;
350+
int CMVAR_FINE_FMIN_WRAP = 0;
351351

352352
if (speed == 10) {
353353
CMVAR_SEC_LOW_TH = S10G_CMVAR_SEC_LOW_TH;

drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,9 @@ static int txgbe_set_link_ksettings(struct net_device *netdev,
797797
(hw->subsystem_device_id & 0xF0) == TXGBE_ID_MAC_SGMII) {
798798
if (!cmd->base.autoneg) {
799799
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
800-
10000baseKR_Full) &
800+
10000baseKR_Full) ||
801801
ethtool_link_ksettings_test_link_mode(cmd, advertising,
802-
1000baseKX_Full) &
802+
1000baseKX_Full) ||
803803
ethtool_link_ksettings_test_link_mode(cmd, advertising,
804804
10000baseKX4_Full))
805805
return -EINVAL;

drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6446,6 +6446,7 @@ s32 txgbe_fdir_set_input_mask(struct txgbe_hw *hw,
64466446
switch (input_mask->formatted.vm_pool & 0x7F) {
64476447
case 0x0:
64486448
fdirm |= TXGBE_RDB_FDIR_OTHER_MSK_POOL;
6449+
break;
64496450
case 0x7F:
64506451
break;
64516452
default:
@@ -6458,6 +6459,7 @@ s32 txgbe_fdir_set_input_mask(struct txgbe_hw *hw,
64586459
if (input_mask->formatted.dst_port ||
64596460
input_mask->formatted.src_port)
64606461
return TXGBE_ERR_CONFIG;
6462+
break;
64616463
case TXGBE_ATR_L4TYPE_MASK:
64626464
break;
64636465
default:

drivers/net/ethernet/wangxun/txgbe/txgbe_ptp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ static int txgbe_ptp_set_timestamp_mode(struct txgbe_adapter *adapter,
653653
switch (config->tx_type) {
654654
case HWTSTAMP_TX_OFF:
655655
tsync_tx_ctl = 0;
656+
fallthrough;
656657
case HWTSTAMP_TX_ON:
657658
break;
658659
default:

drivers/net/ethernet/wangxun/txgbe/txgbe_sriov.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,9 +972,13 @@ static int txgbe_update_vf_xcast_mode(struct txgbe_adapter *adapter,
972972
/* promisc introduced in 1.3 version */
973973
if (xcast_mode == TXGBEVF_XCAST_MODE_PROMISC)
974974
return -EOPNOTSUPP;
975+
fallthrough;
975976
case txgbe_mbox_api_13:
977+
fallthrough;
976978
case txgbe_mbox_api_20:
979+
fallthrough;
977980
case txgbe_mbox_api_21:
981+
fallthrough;
978982
case txgbe_mbox_api_22:
979983
break;
980984
default:

0 commit comments

Comments
 (0)