Commit 2fef7e13 authored by Lisa Nguyen's avatar Lisa Nguyen Committed by Greg Kroah-Hartman

staging: bcm: Remove unnecessary pointer casting

Some void pointers can be assigned to other
pointer variables in functions without casting.
Signed-off-by: default avatarLisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0ac9beb
...@@ -837,7 +837,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) ...@@ -837,7 +837,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
UINT nCurClassifierCnt; UINT nCurClassifierCnt;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
pstAddIndication = (struct bcm_add_indication_alt *)pvBuffer; pstAddIndication = pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type: 0x%X", pstAddIndication->u8Type); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type: 0x%X", pstAddIndication->u8Type);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction: 0x%X", pstAddIndication->u8Direction); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction: 0x%X", pstAddIndication->u8Direction);
...@@ -1339,14 +1339,14 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu ...@@ -1339,14 +1339,14 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu
UINT uiSearchRuleIndex; UINT uiSearchRuleIndex;
ULONG ulSFID; ULONG ulSFID;
pstAddIndicationAlt = (struct bcm_add_indication_alt *)(pvBuffer); pstAddIndicationAlt = pvBuffer;
/* /*
* In case of DSD Req By MS, we should immediately delete this SF so that * In case of DSD Req By MS, we should immediately delete this SF so that
* we can stop the further classifying the pkt for this SF. * we can stop the further classifying the pkt for this SF.
*/ */
if (pstAddIndicationAlt->u8Type == DSD_REQ) { if (pstAddIndicationAlt->u8Type == DSD_REQ) {
pstDeletionRequest = (struct bcm_del_request *)pvBuffer; pstDeletionRequest = pvBuffer;
ulSFID = ntohl(pstDeletionRequest->u32SFID); ulSFID = ntohl(pstDeletionRequest->u32SFID);
uiSearchRuleIndex = SearchSfid(Adapter, ulSFID); uiSearchRuleIndex = SearchSfid(Adapter, ulSFID);
...@@ -1452,12 +1452,12 @@ static inline struct bcm_add_indication_alt ...@@ -1452,12 +1452,12 @@ static inline struct bcm_add_indication_alt
struct bcm_add_indication *pstAddIndication = NULL; struct bcm_add_indication *pstAddIndication = NULL;
struct bcm_add_indication_alt *pstAddIndicationDest = NULL; struct bcm_add_indication_alt *pstAddIndicationDest = NULL;
pstAddIndication = (struct bcm_add_indication *)(pvBuffer); pstAddIndication = pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>");
if ((pstAddIndication->u8Type == DSD_REQ) || if ((pstAddIndication->u8Type == DSD_REQ) ||
(pstAddIndication->u8Type == DSD_RSP) || (pstAddIndication->u8Type == DSD_RSP) ||
(pstAddIndication->u8Type == DSD_ACK)) (pstAddIndication->u8Type == DSD_ACK))
return (struct bcm_add_indication_alt *)pvBuffer; return pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage "); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage ");
/* /*
......
...@@ -192,7 +192,7 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader, ...@@ -192,7 +192,7 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
DBG_LVL_ALL, "IpVersion6 ==========>\n"); DBG_LVL_ALL, "IpVersion6 ==========>\n");
pstIpv6Header = (struct bcm_ipv6_hdr *)pcIpHeader; pstIpv6Header = pcIpHeader;
DumpIpv6Header(pstIpv6Header); DumpIpv6Header(pstIpv6Header);
......
...@@ -6,7 +6,7 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc) ...@@ -6,7 +6,7 @@ int InterfaceFileDownload(PVOID arg, struct file *flp, unsigned int on_chip_loc)
mm_segment_t oldfs = {0}; mm_segment_t oldfs = {0};
int errno = 0, len = 0; /* ,is_config_file = 0 */ int errno = 0, len = 0; /* ,is_config_file = 0 */
loff_t pos = 0; loff_t pos = 0;
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; struct bcm_interface_adapter *psIntfAdapter = arg;
/* struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter; */ /* struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter; */
char *buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL); char *buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL);
...@@ -61,7 +61,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c ...@@ -61,7 +61,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c
loff_t pos = 0; loff_t pos = 0;
static int fw_down; static int fw_down;
INT Status = STATUS_SUCCESS; INT Status = STATUS_SUCCESS;
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; struct bcm_interface_adapter *psIntfAdapter = arg;
int bytes; int bytes;
buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA); buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA);
......
...@@ -184,7 +184,7 @@ int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len) ...@@ -184,7 +184,7 @@ int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len)
{ {
struct bcm_usb_tcb *pTcb= NULL; struct bcm_usb_tcb *pTcb= NULL;
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; struct bcm_interface_adapter *psIntfAdapter = arg;
pTcb= GetBulkOutTcb(psIntfAdapter); pTcb= GetBulkOutTcb(psIntfAdapter);
if(pTcb == NULL) if(pTcb == NULL)
{ {
......
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