diff options
author | Joe Perches <joe@perches.com> | 2011-01-27 20:04:21 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-31 13:53:11 -0800 |
commit | 391bb2116a4ffeeee75dfbbe2e9de678d2fac88d (patch) | |
tree | 0978e763a6785ebc362e50c94621e0295fafff50 /drivers/staging/ath6kl/htc2 | |
parent | 509c9d973055e3d98c0d2aa2cb40c9139526fd74 (diff) |
staging: ath6kl: Remove A_FAILED macro
Remove obfuscating A_FAILED(foo) macro.
Just test for foo instead.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ath6kl/htc2')
-rw-r--r-- | drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 22 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 24 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 28 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 44 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/htc.c | 18 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/htc_recv.c | 42 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/htc_send.c | 4 | ||||
-rw-r--r-- | drivers/staging/ath6kl/htc2/htc_services.c | 4 |
8 files changed, 93 insertions, 93 deletions
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 65c5d9b671a4..6a410f1bae21 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -96,7 +96,7 @@ int DevSetup(AR6K_DEVICE *pDev) status = HIFAttachHTC(pDev->HIFDevice, &htcCallbacks); - if (A_FAILED(status)) { + if (status) { break; } @@ -197,7 +197,7 @@ int DevSetup(AR6K_DEVICE *pDev) status = DevDisableInterrupts(pDev); - if (A_FAILED(status)) { + if (status) { break; } @@ -205,7 +205,7 @@ int DevSetup(AR6K_DEVICE *pDev) } while (FALSE); - if (A_FAILED(status)) { + if (status) { if (pDev->HifAttached) { HIFDetachHTC(pDev->HIFDevice); pDev->HifAttached = FALSE; @@ -343,7 +343,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDoEnableDisableRecvAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); - if (A_FAILED(pPacket->Status)) { + if (pPacket->Status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" Failed to disable receiver, status:%d \n", pPacket->Status)); } @@ -393,7 +393,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, } while (FALSE); - if (A_FAILED(status) && (pIOPacket != NULL)) { + if (status && (pIOPacket != NULL)) { AR6KFreeIOPacket(pDev,pIOPacket); } @@ -462,7 +462,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_ } while (FALSE); - if (A_FAILED(status) && (pIOPacket != NULL)) { + if (status && (pIOPacket != NULL)) { AR6KFreeIOPacket(pDev,pIOPacket); } @@ -510,7 +510,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRec sizeof(A_UCHAR), HIF_RD_SYNC_BYTE_INC, NULL); - if(A_FAILED(status)) + if(status) { AR_DEBUG_PRINTF(ATH_LOG_ERR,("DevWaitForPendingRecv:Read HOST_INT_STATUS_ADDRESS Failed 0x%X\n",status)); break; @@ -721,7 +721,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) } while (FALSE); - if ((status != A_PENDING) && A_FAILED(status) && (request & HIF_ASYNCHRONOUS)) { + if ((status != A_PENDING) && status && (request & HIF_ASYNCHRONOUS)) { if (pIOPacket != NULL) { AR6KFreeIOPacket(pDev,pIOPacket); } @@ -790,7 +790,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) DevFreeScatterReq((HIF_DEVICE *)pDev,pReq); } - if (A_FAILED(status)) { + if (status) { DevCleanupVirtualScatterSupport(pDev); } else { pDev->HifScatterInfo.pAllocateReqFunc = DevAllocScatterReq; @@ -825,7 +825,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) &pDev->HifScatterInfo, sizeof(pDev->HifScatterInfo)); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_WARN, ("AR6K: ** HIF layer does not support scatter requests (%d) \n",status)); @@ -919,7 +919,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_B status = DEV_PREPARE_SCATTER_OPERATION(pScatterReq); - if (A_FAILED(status)) { + if (status) { if (Async) { pScatterReq->CompletionStatus = status; pScatterReq->CompletionRoutine(pScatterReq); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index f12ae42e4152..1e3d6cd43554 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -85,7 +85,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, status = pDev->GetPendingEventsFunc(pDev->HIFDevice, &events, NULL); - if (A_FAILED(status)) + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to get pending events \n")); break; @@ -109,7 +109,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, HIF_RD_SYNC_BYTE_INC, NULL); - if (A_FAILED(status)){ + if (status){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to read register table \n")); break; } @@ -310,7 +310,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) do { - if (A_FAILED(pPacket->Status)) { + if (pPacket->Status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" GetEvents I/O request failed, status:%d \n", pPacket->Status)); /* bail out, don't unmask HIF interrupt */ @@ -501,7 +501,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr &events, NULL); - if (A_FAILED(status)) { + if (status) { break; } @@ -550,7 +550,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr HIF_RD_SYNC_BYTE_INC, NULL); - if (A_FAILED(status)) { + if (status) { break; } @@ -597,7 +597,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr do { /* did the interrupt status fetches succeed? */ - if (A_FAILED(status)) { + if (status) { break; } @@ -617,7 +617,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr * completion routine of the callers read request. This can improve performance * by reducing context switching when we rapidly pull packets */ status = pDev->MessagePendingCallback(pDev->HTCContext, &lookAhead, 1, pASyncProcessing, &fetched); - if (A_FAILED(status)) { + if (status) { break; } @@ -637,7 +637,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr if (HOST_INT_STATUS_CPU_GET(host_int_status)) { /* CPU Interrupt */ status = DevServiceCPUInterrupt(pDev); - if (A_FAILED(status)){ + if (status){ break; } } @@ -645,7 +645,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr if (HOST_INT_STATUS_ERROR_GET(host_int_status)) { /* Error Interrupt */ status = DevServiceErrorInterrupt(pDev); - if (A_FAILED(status)){ + if (status){ break; } } @@ -653,7 +653,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr if (HOST_INT_STATUS_COUNTER_GET(host_int_status)) { /* Counter Interrupt */ status = DevServiceCounterInterrupt(pDev); - if (A_FAILED(status)){ + if (status){ break; } } @@ -697,7 +697,7 @@ int DevDsrHandler(void *context) while (!done) { status = ProcessPendingIRQs(pDev, &done, &asyncProc); - if (A_FAILED(status)) { + if (status) { break; } @@ -763,7 +763,7 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev) HIF_RD_SYNC_BYTE_INC, NULL); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("DumpAR6KDevState : Failed to read register table (%d) \n",status)); return; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index 4c4c8fbfe127..74165765f5ea 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -65,7 +65,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxIRQActionAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); - if (A_FAILED(pPacket->Status)) { + if (pPacket->Status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("IRQAction Operation (%d) failed! status:%d \n", pPacket->PktInfo.AsRx.HTCRxFlags,pPacket->Status)); } @@ -137,7 +137,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE NULL); } while (FALSE); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" IRQAction Operation (%d) failed! status:%d \n", IrqAction, status)); } else { @@ -244,7 +244,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL } while (FALSE); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" IRQAction Operation (%d) failed! status:%d \n", IrqAction, status)); } else { @@ -285,7 +285,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) status = DevGMboxIRQAction(pDev, GMBOX_DISABLE_ALL, PROC_IO_SYNC); - if (A_FAILED(status)) { + if (status) { break; } @@ -305,13 +305,13 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) HIF_WR_SYNC_BYTE_FIX, /* hit this register 4 times */ NULL); - if (A_FAILED(status)) { + if (status) { break; } status = GMboxProtocolInstall(pDev); - if (A_FAILED(status)) { + if (status) { break; } @@ -348,7 +348,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) status = A_ECOMM; } - if (A_FAILED(status)) { + if (status) { if (pDev->GMboxInfo.pTargetFailureCallback != NULL) { pDev->GMboxInfo.pTargetFailureCallback(pDev->GMboxInfo.pProtocolContext, status); } @@ -365,7 +365,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) } } - if (A_FAILED(status)) { + if (status) { break; } @@ -378,7 +378,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) /* do synchronous read */ status = DevGMboxReadCreditCounter(pDev, PROC_IO_SYNC, &credits); - if (A_FAILED(status)) { + if (status) { break; } @@ -522,7 +522,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxReadCreditsAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); - if (A_FAILED(pPacket->Status)) { + if (pPacket->Status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Read Credit Operation failed! status:%d \n", pPacket->Status)); } else { @@ -583,7 +583,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits NULL); } while (FALSE); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" DevGMboxReadCreditCounter failed! status:%d \n", status)); } @@ -659,7 +659,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int HIF_RD_SYNC_BYTE_INC, NULL); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("DevGMboxRecvLookAheadPeek : Failed to read register table (%d) \n",status)); break; @@ -701,7 +701,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) HIF_WR_SYNC_BYTE_FIX, /* hit the register 4 times to align the I/O */ NULL); - if (A_FAILED(status)) { + if (status) { break; } @@ -718,7 +718,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) HIF_RD_SYNC_BYTE_FIX, NULL); - if (A_FAILED(status)) { + if (status) { break; } diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 8c801b09827b..bdb8632dbe84 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -140,7 +140,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits); - if (A_FAILED(status)) { + if (status) { break; } @@ -160,7 +160,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) pProt->CreditsMax += credits; } - if (A_FAILED(status)) { + if (status) { break; } @@ -174,7 +174,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) /* now get the size */ status = DevGMboxReadCreditSize(pProt->pDev, &pProt->CreditSize); - if (A_FAILED(status)) { + if (status) { break; } @@ -353,7 +353,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V break; } - if (A_FAILED(status)) { + if (status) { break; } @@ -426,7 +426,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V do { - if (A_FAILED(status) || (NULL == pPacket)) { + if (status || (NULL == pPacket)) { break; } @@ -438,7 +438,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V status = DevGMboxRead(pProt->pDev, pPacket, totalRecvLength); - if (A_FAILED(status)) { + if (status) { break; } @@ -508,12 +508,12 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V } while (FALSE); /* check if we need to disable the reciever */ - if (A_FAILED(status) || blockRecv) { + if (status || blockRecv) { DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC); } /* see if we need to recycle the recv buffer */ - if (A_FAILED(status) && (pPacket != NULL)) { + if (status && (pPacket != NULL)) { HTC_PACKET_QUEUE queue; if (A_EPROTO == status) { @@ -537,7 +537,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)Context; AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket)); - if (A_FAILED(pPacket->Status)) { + if (pPacket->Status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" Send Packet (0x%lX) failed: %d , len:%d \n", (unsigned long)pPacket, pPacket->Status, pPacket->ActualLength)); } @@ -556,7 +556,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) while (TRUE) { credits = 0; status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits); - if (A_FAILED(status)) { + if (status) { break; } LOCK_HCI_TX(pProt); @@ -676,7 +676,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S break; } - if (A_FAILED(status)) { + if (status) { break; } @@ -706,7 +706,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S UNLOCK_HCI_TX(pProt); status = SeekCreditsSynch(pProt); LOCK_HCI_TX(pProt); - if (A_FAILED(status)) { + if (status) { break; } /* fall through and continue processing this send op */ @@ -784,7 +784,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S UNLOCK_HCI_TX(pProt); } } else { - if (A_FAILED(status) && (pPacket != NULL)) { + if (status && (pPacket != NULL)) { pPacket->Status = status; DO_HCI_SEND_INDICATION(pProt,pPacket); } @@ -1052,7 +1052,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE UNLOCK_HCI_RX(pProt); - if (A_FAILED(status)) { + if (status) { while (!HTC_QUEUE_EMPTY(pQueue)) { pPacket = HTC_PACKET_DEQUEUE(pQueue); pPacket->Status = A_ECANCELED; @@ -1116,25 +1116,25 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) status = InitTxCreditState(pProt); - if (A_FAILED(status)) { + if (status) { break; } status = DevGMboxIRQAction(pProt->pDev, GMBOX_ERRORS_IRQ_ENABLE, PROC_IO_SYNC); - if (A_FAILED(status)) { + if (status) { break; } /* enable recv */ status = DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_ENABLE, PROC_IO_SYNC); - if (A_FAILED(status)) { + if (status) { break; } /* signal bridge side to power up BT */ status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BT_ON, BTON_TIMEOUT_MS); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI_TransportStart : Failed to trigger BT ON \n")); break; } @@ -1178,7 +1178,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, bytes = sizeof(lookAhead); status = DevGMboxRecvLookAheadPeek(pProt->pDev,lookAhead,&bytes); - if (A_FAILED(status)) { + if (status) { break; } @@ -1204,13 +1204,13 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, break; } - if (A_FAILED(status)) { + if (status) { break; } pPacket->Completion = NULL; status = DevGMboxRead(pProt->pDev,pPacket,totalRecvLength); - if (A_FAILED(status)) { + if (status) { break; } @@ -1272,7 +1272,7 @@ int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable) status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_PWR_SAV_OFF, BTPWRSAV_TIMEOUT_MS); } - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to enable/disable HCI power management!\n")); } else { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI power management enabled/disabled!\n")); diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index 2ab5975d79ef..b24698ebbecb 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -137,7 +137,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) /* setup device layer */ status = DevSetup(&target->Device); - if (A_FAILED(status)) { + if (status) { break; } @@ -145,7 +145,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) /* get the block sizes */ status = HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_MBOX_BLOCK_SIZE, blocksizes, sizeof(blocksizes)); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to get block size info from HIF layer...\n")); break; } @@ -165,7 +165,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) } } - if (A_FAILED(status)) { + if (status) { break; } @@ -192,7 +192,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) } while (FALSE); - if (A_FAILED(status)) { + if (status) { if (target != NULL) { HTCCleanup(target); target = NULL; @@ -249,7 +249,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) /* we should be getting 1 control message that the target is ready */ status = HTCWaitforControlMessage(target, &pPacket); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" Target Not Available!!\n")); break; } @@ -305,7 +305,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) /* limit what HTC can handle */ target->MaxMsgPerBundle = min(HTC_HOST_MAX_MSG_PER_BUNDLE, target->MaxMsgPerBundle); /* target supports message bundling, setup device layer */ - if (A_FAILED(DevSetupMsgBundling(&target->Device,target->MaxMsgPerBundle))) { + if (DevSetupMsgBundling(&target->Device,target->MaxMsgPerBundle)) { /* device layer can't handle bundling */ target->MaxMsgPerBundle = 0; } else { @@ -351,7 +351,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) &connect, &resp); - if (!A_FAILED(status)) { + if (!status) { break; } @@ -419,14 +419,14 @@ int HTCStart(HTC_HANDLE HTCHandle) * target that the setup phase is complete */ status = HTCSendSetupComplete(target); - if (A_FAILED(status)) { + if (status) { break; } /* unmask interrupts */ status = DevUnmaskInterrupts(&target->Device); - if (A_FAILED(status)) { + if (status) { HTCStop(target); } diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index 9762109b8bb3..b38211b8828b 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -204,7 +204,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, break; } - if (A_FAILED(status)) { + if (status) { break; } @@ -214,7 +214,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, } #ifdef ATH_DEBUG_MODULE - if (A_FAILED(status)) { + if (status) { DebugDumpBytes(pOrigBuffer,origLength,"BAD Recv Trailer"); } #endif @@ -341,7 +341,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, pNumLookAheads, pPacket->Endpoint); - if (A_FAILED(status)) { + if (status) { break; } @@ -365,7 +365,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, } while (FALSE); - if (A_FAILED(status)) { + if (status) { /* dump the whole packet */ #ifdef ATH_DEBUG_MODULE DebugDumpBytes(pBuf,pPacket->ActualLength < 256 ? pPacket->ActualLength : 256 ,"BAD HTC Recv PKT"); @@ -537,7 +537,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) do { - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTCRecvCompleteHandler: request failed (status:%d, ep:%d) \n", pPacket->Status, pPacket->Endpoint)); break; @@ -545,7 +545,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) /* process the header for any trailer data */ status = HTCProcessRecvHeader(target,pPacket,nextLookAheads,&numLookAheads); - if (A_FAILED(status)) { + if (status) { break; } @@ -570,7 +570,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) } while (FALSE); - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTCRecvCompleteHandler , message fetch failed (status = %d) \n", status)); @@ -605,7 +605,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) &lookAhead, HTC_TARGET_RESPONSE_TIMEOUT); - if (A_FAILED(status)) { + if (status) { break; } @@ -622,7 +622,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) break; } - if (A_FAILED(status)) { + if (status) { /* bad message */ AR_DEBUG_ASSERT(FALSE); status = A_EPROTO; @@ -653,7 +653,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) /* get the message from the device, this will block */ status = HTCIssueRecv(target, pPacket); - if (A_FAILED(status)) { + if (status) { break; } @@ -662,7 +662,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) pPacket->Status = status; - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTCWaitforControlMessage, HTCProcessRecvHeader failed (status = %d) \n", status)); @@ -674,7 +674,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) } while (FALSE); - if (A_FAILED(status)) { + if (status) { if (pPacket != NULL) { /* cleanup buffer on error */ HTC_FREE_CONTROL_RX(target,pPacket); @@ -856,7 +856,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, pPacket->ActualLength = pHdr->PayloadLen + HTC_HDR_LENGTH; } - if (A_FAILED(status)) { + if (status) { if (A_NO_RESOURCE == status) { /* this is actually okay */ status = A_OK; @@ -868,7 +868,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, UNLOCK_HTC_RX(target); - if (A_FAILED(status)) { + if (status) { while (!HTC_QUEUE_EMPTY(pQueue)) { pPacket = HTC_PACKET_DEQUEUE(pQueue); /* recycle all allocated packets */ @@ -897,7 +897,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) A_ASSERT(!IS_DEV_IRQ_PROC_SYNC_MODE(&target->Device)); - if (A_FAILED(pScatterReq->CompletionStatus)) { + if (pScatterReq->CompletionStatus) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("** Recv Scatter Request Failed: %d \n",pScatterReq->CompletionStatus)); } @@ -1186,7 +1186,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu NumLookAheads, pEndpoint, &recvPktQueue); - if (A_FAILED(status)) { + if (status) { break; } @@ -1214,7 +1214,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu asyncProc ? NULL : &syncCompletedPktsQueue, &pktsFetched, partialBundle); - if (A_FAILED(status)) { + if (status) { break; } @@ -1248,7 +1248,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu /* go fetch the packet */ status = HTCIssueRecv(target, pPacket); - if (A_FAILED(status)) { + if (status) { break; } @@ -1295,7 +1295,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu /* process header for each of the recv packets * note: the lookahead of the last packet is useful for us to continue in this loop */ status = HTCProcessRecvHeader(target,pPacket,lookAheads,&NumLookAheads); - if (A_FAILED(status)) { + if (status) { break; } @@ -1317,7 +1317,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu DO_RCV_COMPLETION(pEndpoint,&container); } - if (A_FAILED(status)) { + if (status) { break; } @@ -1346,7 +1346,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu REF_IRQ_STATUS_RECHECK(&target->Device); } - if (A_FAILED(status)) { + if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to get pending recv messages (%d) \n",status)); /* cleanup any packets we allocated but didn't use to actually fetch any packets */ diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index 797400802e2a..e645e2d3b434 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -81,7 +81,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoin { pPacket->Completion = NULL; - if (A_FAILED(pPacket->Status)) { + if (pPacket->Status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("CompleteSentPacket: request failed (status:%d, ep:%d, length:%d creds:%d) \n", pPacket->Status, pPacket->Endpoint, pPacket->ActualLength, pPacket->PktInfo.AsTx.CreditsUsed)); @@ -280,7 +280,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq) DEV_FINISH_SCATTER_OPERATION(pScatterReq); - if (A_FAILED(pScatterReq->CompletionStatus)) { + if (pScatterReq->CompletionStatus) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("** Send Scatter Request Failed: %d \n",pScatterReq->CompletionStatus)); status = A_ERROR; } diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index a78660264977..63189b583618 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -184,14 +184,14 @@ int HTCConnectService(HTC_HANDLE HTCHandle, HTC_PREPARE_SEND_PKT(pSendPacket,0,0,0); status = HTCIssueSend(target,pSendPacket); - if (A_FAILED(status)) { + if (status) { break; } /* wait for response */ status = HTCWaitforControlMessage(target, &pRecvPacket); - if (A_FAILED(status)) { + if (status) { break; } /* we controlled the buffer creation so it has to be properly aligned */ |