Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f69cef0 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: ath6kl: Remove #define A_OK



Just use 0.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a1d46529
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ BMIDone(HIF_DEVICE *device)

    if (bmiDone) {
        AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n"));
        return A_OK;
        return 0;
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
@@ -138,7 +138,7 @@ BMIDone(HIF_DEVICE *device)

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n"));

    return A_OK;
    return 0;
}

int
@@ -197,7 +197,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Exit (ver: 0x%x type: 0x%x)\n",
        							targ_info->target_ver, targ_info->target_type));

    return A_OK;
    return 0;
}

int
@@ -253,7 +253,7 @@ BMIReadMemory(HIF_DEVICE *device,
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read Memory: Exit\n"));
    return A_OK;
    return 0;
}

int
@@ -318,7 +318,7 @@ BMIWriteMemory(HIF_DEVICE *device,

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Write Memory: Exit\n"));

    return A_OK;
    return 0;
}

int
@@ -366,7 +366,7 @@ BMIExecute(HIF_DEVICE *device,
    A_MEMCPY(param, pBMICmdBuf, sizeof(*param));

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param));
    return A_OK;
    return 0;
}

int
@@ -403,7 +403,7 @@ BMISetAppStart(HIF_DEVICE *device,
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Set App Start: Exit\n"));
    return A_OK;
    return 0;
}

int
@@ -449,7 +449,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
    A_MEMCPY(param, pBMICmdBuf, sizeof(*param));

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param));
    return A_OK;
    return 0;
}

int
@@ -489,7 +489,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit\n"));
    return A_OK;
    return 0;
}

int
@@ -545,7 +545,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
    A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id));

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id));
    return A_OK;
    return 0;
}

int
@@ -582,7 +582,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch UNinstall: (rompatch_id=0x%x)\n", rompatch_id));
    return A_OK;
    return 0;
}

static int
@@ -626,7 +626,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Change rompatch Activation: Exit\n"));

    return A_OK;
    return 0;
}

int
@@ -692,7 +692,7 @@ BMILZData(HIF_DEVICE *device,

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Data: Exit\n"));

    return A_OK;
    return 0;
}

int
@@ -729,7 +729,7 @@ BMILZStreamStart(HIF_DEVICE *device,

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Stream Start: Exit\n"));

    return A_OK;
    return 0;
}

/* BMI Access routines */
@@ -954,7 +954,7 @@ bmiBufferReceive(HIF_DEVICE *device,
        return A_ERROR;
    }

    return A_OK;
    return 0;
}

int
+23 −23
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
        return A_ERROR;
    }

    return A_OK;
    return 0;

}

@@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
             void *context)
{
    u8 opcode;
    int    status = A_OK;
    int    status = 0;
    int     ret;
    u8 *tbuffer;
    bool   bounced = false;
@@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
             u32 request,
             void *context)
{
    int    status = A_OK;
    int    status = 0;
    BUS_REQUEST *busrequest;


@@ -644,13 +644,13 @@ int ReinitSDIO(HIF_DEVICE *device)
    sdio_release_host(func);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));

    return (err) ? A_ERROR : A_OK;
    return (err) ? A_ERROR : 0;
}

int
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{
    int status = A_OK;
    int status = 0;
#if defined(CONFIG_PM)
	struct sdio_func *func = device->func;
    int old_reset_val;
@@ -678,7 +678,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
            if (device->powerConfig == HIF_DEVICE_POWER_CUT) {
                status = ReinitSDIO(device);
            }
            if (status == A_OK) {
            if (status == 0) {
                status = hifEnableFunc(device, func);
            }
            break;
@@ -695,7 +695,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
                   void *config, u32 configLen)
{
    u32 count;
    int status = A_OK;
    int status = 0;
    
    switch(opcode) {
        case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
@@ -785,7 +785,7 @@ hifIRQHandler(struct sdio_func *func)
    status = device->htcCallbacks.dsrHandler(device->htcCallbacks.context);
    sdio_claim_host(device->func);
    atomic_set(&device->irqHandling, 0);
    AR_DEBUG_ASSERT(status == A_OK || status == A_ECANCELED);
    AR_DEBUG_ASSERT(status == 0 || status == A_ECANCELED);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifIRQHandler\n"));
}

@@ -797,7 +797,7 @@ static int startup_task(void *param)
    device = (HIF_DEVICE *)param;
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
        /* start  up inform DRV layer */
    if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != A_OK) {
    if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
        AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
    }
    return 0;
@@ -814,7 +814,7 @@ static int enable_task(void *param)
    if (device && 
        device->claimedContext && 
        osdrvCallbacks.devicePowerChangeHandler &&
        osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != A_OK) 
        osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != 0)
    {
        AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
    }
@@ -952,7 +952,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
{
    int ret;
    int status = A_OK;
    int status = 0;

    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
    device = getHifDevice(func);
@@ -988,7 +988,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)

    sdio_release_host(device->func);

    if (status == A_OK) {
    if (status == 0) {
        device->is_disabled = true;
    }
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));
@@ -1001,7 +1001,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
    struct task_struct* pTask;
    const char *taskName = NULL;
    int (*taskFunc)(void *) = NULL;
    int ret = A_OK;
    int ret = 0;
    
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n"));
    device = getHifDevice(func);
@@ -1055,7 +1055,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
    if (!device->claimedContext) {
        taskFunc = startup_task;
        taskName = "AR6K startup";
        ret = A_OK;
        ret = 0;
#if defined(CONFIG_PM)
    } else {
        taskFunc = enable_task;
@@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
static int hifDeviceSuspend(struct device *dev)
{
    struct sdio_func *func=dev_to_sdio_func(dev);
    int status = A_OK;
    int status = 0;
    HIF_DEVICE *device;   

    device = getHifDevice(func);
@@ -1095,7 +1095,7 @@ static int hifDeviceSuspend(struct device *dev)
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));

    switch (status) {
    case A_OK:
    case 0:
        return 0;
    case A_EBUSY:
        return -EBUSY; /* Hack for kernel in order to support deep sleep and wow */
@@ -1107,14 +1107,14 @@ static int hifDeviceSuspend(struct device *dev)
static int hifDeviceResume(struct device *dev)
{
    struct sdio_func *func=dev_to_sdio_func(dev);
    int status = A_OK;
    int status = 0;
    HIF_DEVICE *device;   

    device = getHifDevice(func);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
    if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
        status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
        if (status == A_OK) {
        if (status == 0) {
            device->is_suspend = false;
        }
    }
@@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)

static void hifDeviceRemoved(struct sdio_func *func)
{
    int status = A_OK;
    int status = 0;
    HIF_DEVICE *device;
    AR_DEBUG_ASSERT(func != NULL);

@@ -1144,7 +1144,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
    CleanupHIFScatterResources(device);
     
    delHifDevice(device);
    AR_DEBUG_ASSERT(status == A_OK);
    AR_DEBUG_ASSERT(status == 0);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
}

@@ -1155,7 +1155,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
{
    s32 cnt = 10;
    u8 host_int_status;
    int status = A_OK;
    int status = 0;

    do {            		    
        while (atomic_read(&device->irqHandling)) {
@@ -1178,7 +1178,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
                            ("AR6000: %s(), Unable clear up pending IRQ before the system suspended\n", __FUNCTION__));
     }

    return A_OK;
    return 0;
}
    

@@ -1240,7 +1240,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
        return A_ERROR;
    }
    device->htcCallbacks = *callbacks;
    return A_OK;
    return 0;
}

void HIFDetachHTC(HIF_DEVICE *device)
+4 −4
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
    struct mmc_data         data;
    HIF_SCATTER_REQ_PRIV   *pReqPriv;   
    HIF_SCATTER_REQ        *pReq;       
    int                status = A_OK;
    int                status = 0;
    struct                  scatterlist *pSg;
    
    pReqPriv = busrequest->pScatterReq;
@@ -260,7 +260,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
            AR_DEBUG_PRINTF(ATH_DEBUG_SCATTER, ("HIF-SCATTER: queued async req: 0x%lX\n", (unsigned long)pReqPriv->busrequest));
                /* wake thread, it will process and then take care of the async callback */
            up(&device->sem_async);
            status = A_OK;
            status = 0;
        }           
       
    } while (false);
@@ -268,7 +268,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
    if (status && (request & HIF_ASYNCHRONOUS)) {
        pReq->CompletionStatus = status;
        pReq->CompletionRoutine(pReq);
        status = A_OK;
        status = 0;
    }
        
    return status;  
@@ -344,7 +344,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
        pInfo->MaxScatterEntries = MAX_SCATTER_ENTRIES_PER_REQ;
        pInfo->MaxTransferSizePerScatterReq = MAX_SCATTER_REQ_TRANSFER_SIZE;
     
        status = A_OK;
        status = 0;
        
    } while (false);
    
+17 −17
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ void DevCleanup(AR6K_DEVICE *pDev)
int DevSetup(AR6K_DEVICE *pDev)
{
    u32 blocksizes[AR6K_MAILBOXES];
    int status = A_OK;
    int status = 0;
    int      i;
    HTC_CALLBACKS htcCallbacks;

@@ -309,7 +309,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev)
     * and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets.
     * The AR6K interrupt enables reset back to an "enabled" state when this happens.
     *  */
    int IntStatus = A_OK;
    int IntStatus = 0;
    DevDisableInterrupts(pDev);

#ifdef THREAD_X
@@ -357,7 +357,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
 * disable recv events */
static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
{
    int                  status = A_OK;
    int                  status = 0;
    HTC_PACKET                *pIOPacket = NULL;

    AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
@@ -405,7 +405,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo
 * the host I/F */
static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
{
    int                  status = A_OK;
    int                  status = 0;
    HTC_PACKET                *pIOPacket = NULL;
    AR6K_IRQ_ENABLE_REGISTERS regs;

@@ -490,7 +490,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode)

int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending)
{
    int    status          = A_OK;
    int    status          = 0;
    A_UCHAR     host_int_status = 0x0;
    u32 counter         = 0x0;

@@ -519,7 +519,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin
        host_int_status = !status ? (host_int_status & (1 << 0)):0;
        if(!host_int_status)
        {
            status          = A_OK;
            status          = 0;
           *pbIsRecvPending = false;
            break;
        }
@@ -645,7 +645,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
        remaining -= length;
    }

    return A_OK;
    return 0;
}

static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
@@ -667,7 +667,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
{
    AR6K_DEVICE     *pDev = (AR6K_DEVICE *)Context;
    int        status = A_OK;
    int        status = 0;
    HTC_PACKET      *pIOPacket = NULL;
    u32 request = pReq->Request;

@@ -727,7 +727,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
        }
        pReq->CompletionStatus = status;
        pReq->CompletionRoutine(pReq);
        status = A_OK;
        status = 0;
    }

    return status;
@@ -751,7 +751,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev)
    /* function to set up virtual scatter support if HIF layer has not implemented the interface */
static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
{
    int                     status = A_OK;
    int                     status = 0;
    int                          bufferSize, sgreqSize;
    int                          i;
    DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo;
@@ -923,7 +923,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
        if (Async) {
            pScatterReq->CompletionStatus = status;
            pScatterReq->CompletionRoutine(pScatterReq);
            return A_OK;
            return 0;
        }
        return status;
    }
@@ -936,7 +936,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
        DEV_FINISH_SCATTER_OPERATION(pScatterReq);
    } else {
        if (status == A_PENDING) {
            status = A_OK;
            status = 0;
        }
    }

@@ -1127,7 +1127,7 @@ static u16 GetEndMarker(void)
/* send the ordered buffers to the target */
static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
{
    int         status = A_OK;
    int         status = 0;
    u32 request = HIF_WR_SYNC_BLOCK_INC;
    BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH];
    int              i;
@@ -1171,7 +1171,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
/* poll the mailbox credit counter until we get a credit or timeout */
static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
{
    int status = A_OK;
    int status = 0;
    int      timeout = TEST_CREDITS_RECV_TIMEOUT;
    u8 credits = 0;
    u32 address;
@@ -1207,7 +1207,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)

    }

    if (status == A_OK) {
    if (status == 0) {
        *pCredits = credits;
    }

@@ -1218,7 +1218,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
/* wait for the buffers to come back */
static int RecvBuffers(AR6K_DEVICE *pDev, int mbox)
{
    int         status = A_OK;
    int         status = 0;
    u32 request = HIF_RD_SYNC_BLOCK_INC;
    BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH];
    int              curBuffer;
@@ -1457,7 +1457,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev)

    } while (false);

    if (status == A_OK) {
    if (status == 0) {
        AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! -  \n"));
    } else {
        AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - FAILED! -  \n"));
+6 −6
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
        A_ASSERT(false);
        if (pPacket->Completion != NULL) {
            COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
            return A_OK;
            return 0;
        }
        return A_EINVAL;
    }
@@ -212,7 +212,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
        pPacket->Status = status;
    } else {
        if (status == A_PENDING) {
            status = A_OK;    
            status = 0;
        }    
    }

@@ -234,7 +234,7 @@ static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Recv
                    paddedLength,RecvLength,pPacket->BufferLength));
        if (pPacket->Completion != NULL) {
            COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
            return A_OK;
            return 0;
        }
        return A_EINVAL;
    }
@@ -291,7 +291,7 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
    if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) {
        return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER);    
    } else {
        return A_OK;    
        return 0;
    }
}
        
@@ -346,12 +346,12 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);

    /* compiled out */
#define DevCleanupGMbox(p)
#define DevCheckGMboxInterrupts(p) A_OK
#define DevCheckGMboxInterrupts(p) 0
#define DevNotifyGMboxTargetFailure(p)

static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
    pDev->GMboxEnabled = false;
    return A_OK;    
    return 0;
}

#endif
Loading