Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: bcm: Remove unnecessary pointer casting

Some void pointers can be assigned to other
pointer variables in functions without casting.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lisa Nguyen and committed by
Greg Kroah-Hartman
2fef7e13 f0ac9beb

+9 -9
+5 -5
drivers/staging/bcm/CmHost.c
··· 837 837 UINT nCurClassifierCnt; 838 838 struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); 839 839 840 - pstAddIndication = (struct bcm_add_indication_alt *)pvBuffer; 840 + pstAddIndication = pvBuffer; 841 841 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>"); 842 842 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type: 0x%X", pstAddIndication->u8Type); 843 843 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction: 0x%X", pstAddIndication->u8Direction); ··· 1339 1339 UINT uiSearchRuleIndex; 1340 1340 ULONG ulSFID; 1341 1341 1342 - pstAddIndicationAlt = (struct bcm_add_indication_alt *)(pvBuffer); 1342 + pstAddIndicationAlt = pvBuffer; 1343 1343 1344 1344 /* 1345 1345 * In case of DSD Req By MS, we should immediately delete this SF so that 1346 1346 * we can stop the further classifying the pkt for this SF. 1347 1347 */ 1348 1348 if (pstAddIndicationAlt->u8Type == DSD_REQ) { 1349 - pstDeletionRequest = (struct bcm_del_request *)pvBuffer; 1349 + pstDeletionRequest = pvBuffer; 1350 1350 1351 1351 ulSFID = ntohl(pstDeletionRequest->u32SFID); 1352 1352 uiSearchRuleIndex = SearchSfid(Adapter, ulSFID); ··· 1452 1452 struct bcm_add_indication *pstAddIndication = NULL; 1453 1453 struct bcm_add_indication_alt *pstAddIndicationDest = NULL; 1454 1454 1455 - pstAddIndication = (struct bcm_add_indication *)(pvBuffer); 1455 + pstAddIndication = pvBuffer; 1456 1456 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>"); 1457 1457 if ((pstAddIndication->u8Type == DSD_REQ) || 1458 1458 (pstAddIndication->u8Type == DSD_RSP) || 1459 1459 (pstAddIndication->u8Type == DSD_ACK)) 1460 - return (struct bcm_add_indication_alt *)pvBuffer; 1460 + return pvBuffer; 1461 1461 1462 1462 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage "); 1463 1463 /*
+1 -1
drivers/staging/bcm/IPv6Protocol.c
··· 192 192 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, 193 193 DBG_LVL_ALL, "IpVersion6 ==========>\n"); 194 194 195 - pstIpv6Header = (struct bcm_ipv6_hdr *)pcIpHeader; 195 + pstIpv6Header = pcIpHeader; 196 196 197 197 DumpIpv6Header(pstIpv6Header); 198 198
+2 -2
drivers/staging/bcm/InterfaceDld.c
··· 6 6 mm_segment_t oldfs = {0}; 7 7 int errno = 0, len = 0; /* ,is_config_file = 0 */ 8 8 loff_t pos = 0; 9 - struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; 9 + struct bcm_interface_adapter *psIntfAdapter = arg; 10 10 /* struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter; */ 11 11 char *buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL); 12 12 ··· 61 61 loff_t pos = 0; 62 62 static int fw_down; 63 63 INT Status = STATUS_SUCCESS; 64 - struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; 64 + struct bcm_interface_adapter *psIntfAdapter = arg; 65 65 int bytes; 66 66 67 67 buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
+1 -1
drivers/staging/bcm/InterfaceTx.c
··· 184 184 { 185 185 struct bcm_usb_tcb *pTcb= NULL; 186 186 187 - struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; 187 + struct bcm_interface_adapter *psIntfAdapter = arg; 188 188 pTcb= GetBulkOutTcb(psIntfAdapter); 189 189 if(pTcb == NULL) 190 190 {