staging: rtl8192u: use __le16_to_cpu instead of cast
PATCH 1/1 staging: rtl8192u: use __le16_to_cpu instead of cast
This patch fixes the following sparse warnings:drivers/staging/rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted __le16 drivers/staging/rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted __le16 drivers/staging/rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted __le16
--- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/r8192U_dm.c +3 -3
@@ -2304,9 +2304,9 @@ static void dm_check_edca_turbo(/* For Each time updating EDCA parameter, reset EDCA turbo mode status. */ dm_init_edca_turbo (dev); u1bAIFS = qos_parameters->aifs[0 ] * ((mode&(IEEE_G |IEEE_N_24G )) ?9 :20 ) + aSifsTime; - u4bAcParam = (((u32)(qos_parameters->tx_op_limit[0 ])) <<AC_PARAM_TXOP_LIMIT_OFFSET )| - (((u32)(qos_parameters->cw_max[0 ])) <<AC_PARAM_ECW_MAX_OFFSET )| - (((u32)(qos_parameters->cw_min[0 ])) <<AC_PARAM_ECW_MIN_OFFSET )| + u4bAcParam = (((u32 )__le16_to_cpu (qos_parameters->tx_op_limit[0 ])) <<AC_PARAM_TXOP_LIMIT_OFFSET ) | + (((u32 )__le16_to_cpu (qos_parameters->cw_max[0 ])) <<AC_PARAM_ECW_MAX_OFFSET ) | + (((u32 )__le16_to_cpu (qos_parameters->cw_min[0 ])) <<AC_PARAM_ECW_MIN_OFFSET ) | ((u32 )u1bAIFS <<AC_PARAM_AIFS_OFFSET );/*write_nic_dword(dev, WDCAPARA_ADD[i], u4bAcParam);*/ write_nic_dword (dev,EDCAPARA_BE , u4bAcParam);
Signature · 1 line
2.4.11
Greg KH
maintainerQuoted 9 lines · Perry Hooker
This patch fixes the following sparse warnings:
drivers/staging/rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted__le16drivers/staging/rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted__le16drivers/staging/rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted__le16Signed-off-by Perry Hooker <[email protected]>--- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
This patch does not apply to my tree at all :(
Please rebase it against linux-next and try again.
thanks,
greg k-h