diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c index 8eef82d92621..ed8854b902d1 100644 --- a/drivers/staging/rt2860/common/ba_action.c +++ b/drivers/staging/rt2860/common/ba_action.c @@ -799,8 +799,8 @@ void BAOriSessionTearDown(struct rt_rtmp_adapter *pAd, /* force send specified TID DelBA */ struct rt_mlme_delba_req DelbaReq; struct rt_mlme_queue_elem *Elem = - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), - MEM_ALLOC_FLAG); + kmalloc(sizeof(struct rt_mlme_queue_elem), + MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); @@ -839,8 +839,8 @@ void BAOriSessionTearDown(struct rt_rtmp_adapter *pAd, && (pBAEntry->ORI_BA_Status == Originator_Done)) { struct rt_mlme_delba_req DelbaReq; struct rt_mlme_queue_elem *Elem = - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), - MEM_ALLOC_FLAG); + kmalloc(sizeof(struct rt_mlme_queue_elem), + MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); @@ -908,8 +908,8 @@ void BARecSessionTearDown(struct rt_rtmp_adapter *pAd, /* */ if (bPassive == FALSE) { struct rt_mlme_queue_elem *Elem = - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), - MEM_ALLOC_FLAG); + kmalloc(sizeof(struct rt_mlme_queue_elem), + MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index 19e9bc6569f8..e8648219e0b5 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -102,8 +102,8 @@ int MainVirtualIF_close(IN struct net_device *net_dev) (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) { struct rt_mlme_disassoc_req DisReq; struct rt_mlme_queue_elem *MsgElem = - (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), - MEM_ALLOC_FLAG); + kmalloc(sizeof(struct rt_mlme_queue_elem), + MEM_ALLOC_FLAG); if (MsgElem) { COPY_MAC_ADDR(DisReq.Addr, @@ -725,7 +725,8 @@ Note: int AdapterBlockAllocateMemory(void *handle, void ** ppAd) { - *ppAd = (void *)vmalloc(sizeof(struct rt_rtmp_adapter)); /*pci_alloc_consistent(pci_dev, sizeof(struct rt_rtmp_adapter), phy_addr); */ + *ppAd = vmalloc(sizeof(struct rt_rtmp_adapter)); + /* pci_alloc_consistent(pci_dev, sizeof(struct rt_rtmp_adapter), phy_addr); */ if (*ppAd) { NdisZeroMemory(*ppAd, sizeof(struct rt_rtmp_adapter));