From 0f11b53dbc69ffd2d80548f6c32e44adb697401a Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Wed, 5 Mar 2014 04:53:58 +0530 Subject: [PATCH] staging:rtl8712: Fix sparse warning incorrect type in assignment This patch fixes the following sparse warnings: drivers/staging/rtl8712/rtl871x_cmd.c:471:30: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_cmd.c:471:30: expected unsigned int [unsigned] [usertype] Length drivers/staging/rtl8712/rtl871x_cmd.c:471:30: got restricted __le32 [usertype] drivers/staging/rtl8712/rtl871x_cmd.c:472:32: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_cmd.c:472:32: expected unsigned int [unsigned] [usertype] IELength drivers/staging/rtl8712/rtl871x_cmd.c:472:32: got restricted __le32 [usertype] drivers/staging/rtl8712/rtl871x_cmd.c:473:39: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_cmd.c:473:39: expected unsigned int [unsigned] [usertype] SsidLength drivers/staging/rtl8712/rtl871x_cmd.c:473:39: got restricted __le32 [usertype] Signed-off-by: Himangi Saraogi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index c71c7e55bb36..14e1270d3219 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -468,10 +468,9 @@ u8 r8712_createbss_cmd(struct _adapter *padapter) pcmd->rsp = NULL; pcmd->rspsz = 0; /* notes: translate IELength & Length after assign to cmdsz; */ - pdev_network->Length = cpu_to_le32(pcmd->cmdsz); - pdev_network->IELength = cpu_to_le32(pdev_network->IELength); - pdev_network->Ssid.SsidLength = cpu_to_le32( - pdev_network->Ssid.SsidLength); + pdev_network->Length = pcmd->cmdsz; + pdev_network->IELength = pdev_network->IELength; + pdev_network->Ssid.SsidLength = pdev_network->Ssid.SsidLength; r8712_enqueue_cmd(pcmdpriv, pcmd); return _SUCCESS; }