Sparse warns about these casts to/from restricted types which are not
actual problems; silence the warnings.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/ice/base/ice_nvm.c | 2 +-
drivers/net/ice/base/ice_switch.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -138,7 +138,7 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
* boundary
*/
status = ice_read_flat_nvm(hw, offset * sizeof(u16), &bytes,
- (u8 *)&data_local, true);
+ (_FORCE_ u8 *)&data_local, true);
if (status)
return status;
@@ -5774,7 +5774,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule,
lkup_exts->fv_words[word].prot_id =
ice_prot_id_tbl[rule->type].protocol_id;
lkup_exts->field_mask[word] =
- BE16_TO_CPU(((__be16 *)&rule->m_u)[j]);
+ BE16_TO_CPU(((_FORCE_ __be16 *)&rule->m_u)[j]);
word++;
}