Fix sparse warning: > rtw_br_ext.c:516:57: warning: incorrect type in assignment (different base types) > rtw_br_ext.c:516:57: expected unsigned short > rtw_br_ext.c:516:57: got restricted __be16 [usertype] *pMagic expects unsigned short not __be16, so remove htons and cast MAGIC_CODE as unsigned short Signed-off-by: Aakash Hemadri <aakashhemadri123@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_br_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c index 14b2935cab98..600a38330579 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -513,7 +513,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) /* insert the magic_code+client mac in relay tag */ pMagic = (unsigned short *)tag->tag_data; - *pMagic = htons(MAGIC_CODE); + *pMagic = (unsigned short)MAGIC_CODE; memcpy(tag->tag_data+MAGIC_CODE_LEN, skb->data+ETH_ALEN, ETH_ALEN); /* Add relay tag */ -- 2.32.0