Commit d0beccb0 authored by Luca Ceresoli's avatar Luca Ceresoli Committed by Greg Kroah-Hartman

staging: rtl8188eu: don't cast to void* when calling memset()

The first argument to memset() is (void *), the explicit typecasts are
not needed. They just make code less readable.
Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8891bcac
......@@ -569,7 +569,7 @@ static void update_bmc_sta(struct adapter *padapter)
psta->ieee8021x_blocked = 0;
memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
memset(&psta->sta_stats, 0, sizeof(struct stainfo_stats));
/* prepare for add_RATid */
supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
......@@ -692,7 +692,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
/* todo: init other variables */
memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
memset(&psta->sta_stats, 0, sizeof(struct stainfo_stats));
spin_lock_bh(&psta->lock);
psta->state |= _FW_LINKED;
......
......@@ -394,7 +394,7 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e
u8 badworden = 0x0F;
u8 tmpdata[8];
memset((void *)tmpdata, 0xff, PGPKT_DATA_SIZE);
memset(tmpdata, 0xff, PGPKT_DATA_SIZE);
if (!(word_en & BIT(0))) {
tmpaddr = start_addr;
......@@ -500,8 +500,8 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data)
if (offset > max_section)
return false;
memset((void *)data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
memset((void *)tmpdata, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
memset(data, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
memset(tmpdata, 0xff, sizeof(u8) * PGPKT_DATA_SIZE);
/* <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */
/* Skip dummy parts to prevent unexpected data read from Efuse. */
......@@ -572,7 +572,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
u16 efuse_addr = *pAddr;
u32 PgWriteSuccess = 0;
memset((void *)originaldata, 0xff, 8);
memset(originaldata, 0xff, 8);
if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata)) {
/* check if data exist */
......
......@@ -1081,13 +1081,13 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
frsubtype >>= 4;
memset((void *)mic_iv, 0, 16);
memset((void *)mic_header1, 0, 16);
memset((void *)mic_header2, 0, 16);
memset((void *)ctr_preload, 0, 16);
memset((void *)chain_buffer, 0, 16);
memset((void *)aes_out, 0, 16);
memset((void *)padded_buffer, 0, 16);
memset(mic_iv, 0, 16);
memset(mic_header1, 0, 16);
memset(mic_header2, 0, 16);
memset(ctr_preload, 0, 16);
memset(chain_buffer, 0, 16);
memset(aes_out, 0, 16);
memset(padded_buffer, 0, 16);
if ((hdrlen == WLAN_HDR_A3_LEN) || (hdrlen == WLAN_HDR_A3_QOS_LEN))
a4_exists = 0;
......@@ -1279,13 +1279,13 @@ static int aes_decipher(u8 *key, uint hdrlen,
uint frsubtype = GetFrameSubType(pframe);
frsubtype >>= 4;
memset((void *)mic_iv, 0, 16);
memset((void *)mic_header1, 0, 16);
memset((void *)mic_header2, 0, 16);
memset((void *)ctr_preload, 0, 16);
memset((void *)chain_buffer, 0, 16);
memset((void *)aes_out, 0, 16);
memset((void *)padded_buffer, 0, 16);
memset(mic_iv, 0, 16);
memset(mic_header1, 0, 16);
memset(mic_header2, 0, 16);
memset(ctr_preload, 0, 16);
memset(chain_buffer, 0, 16);
memset(aes_out, 0, 16);
memset(padded_buffer, 0, 16);
/* start to decrypt the payload */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment