ice: silence static analysis warning
authorBruce Allan <bruce.w.allan@intel.com>
Thu, 17 Sep 2020 20:13:45 +0000 (13:13 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 9 Dec 2020 16:11:55 +0000 (08:11 -0800)
sparse warns about cast to/from restricted types which is not
an actual problem; silence the warning.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_nvm.c

index dc0d82c844ad1b8eae588b8a36f9acd1d3241fe4..0d1092cbc9272dbb824bc71da208205a506a2244 100644 (file)
@@ -196,7 +196,7 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
         * Shadow RAM sector restrictions necessary when reading from the NVM.
         */
        status = ice_read_flat_nvm(hw, offset * sizeof(u16), &bytes,
-                                  (u8 *)&data_local, true);
+                                  (__force u8 *)&data_local, true);
        if (status)
                return status;