ice: Resolve static analysis warning
authorBruce Allan <bruce.w.allan@intel.com>
Tue, 16 Apr 2019 17:30:40 +0000 (10:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 29 May 2019 09:36:58 +0000 (02:36 -0700)
Some static analysis tools can complain when doing a bitop assignment using
operands of different sizes. Fix that.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c

index 2364eaf33d236ff5f78b7a47a76cdb8af0445e2d..8e552a43681a7bd392794d0b2c553c7fb05319e7 100644 (file)
@@ -1874,10 +1874,10 @@ int ice_tso(struct ice_tx_buf *first, struct ice_tx_offload_params *off)
        cd_mss = skb_shinfo(skb)->gso_size;
 
        /* record cdesc_qw1 with TSO parameters */
-       off->cd_qw1 |= ICE_TX_DESC_DTYPE_CTX |
-                        (ICE_TX_CTX_DESC_TSO << ICE_TXD_CTX_QW1_CMD_S) |
-                        (cd_tso_len << ICE_TXD_CTX_QW1_TSO_LEN_S) |
-                        (cd_mss << ICE_TXD_CTX_QW1_MSS_S);
+       off->cd_qw1 |= (u64)(ICE_TX_DESC_DTYPE_CTX |
+                            (ICE_TX_CTX_DESC_TSO << ICE_TXD_CTX_QW1_CMD_S) |
+                            (cd_tso_len << ICE_TXD_CTX_QW1_TSO_LEN_S) |
+                            (cd_mss << ICE_TXD_CTX_QW1_MSS_S));
        first->tx_flags |= ICE_TX_FLAGS_TSO;
        return 1;
 }