From 3b085e6054fa58fa05823f2f9a3ef8d948309d71 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Wed, 26 Aug 2020 14:44:33 +0800 Subject: [PATCH] net/ice/base: silence static analysis warning Sparse warns about these casts to/from restricted types which are not actual problems; silence the warnings. Signed-off-by: Bruce Allan Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_nvm.c | 2 +- drivers/net/ice/base/ice_switch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c index 2befe68d76..22d7d9439a 100644 --- a/drivers/net/ice/base/ice_nvm.c +++ b/drivers/net/ice/base/ice_nvm.c @@ -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; diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index e0eebe3d55..875922459e 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -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++; } -- 2.20.1