qcacmn: Remove qdf_handle_t from unused qdf_defer APIs
There are many QDF APIs require a qdf_handle_t parameter. None of these APIs actually use the qdf_handle_t parameter, meaning it can be completely removed. As a step toward globally removing this unused type, remove qdf_handle_t parameters from unsed qdf_defer APIs. Change-Id: I0568aa7cbd430abc0d046143482a067d96bf6313 CRs-Fixed: 2112646
This commit is contained in:

committed by
Nandini Suresh

parent
5fd835b44b
commit
f653d16e6c
@@ -82,15 +82,13 @@ typedef void (*__qdf_bh_fn_t)(unsigned long arg);
|
||||
/**
|
||||
* __qdf_init_work - Initialize a work/task queue, This runs in non-interrupt
|
||||
* context, so can be preempted by H/W & S/W intr
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to work
|
||||
* @func: deferred function to run at bottom half non-interrupt context.
|
||||
* @arg: argument for the deferred function
|
||||
* Return: none
|
||||
*/
|
||||
static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl,
|
||||
__qdf_work_t *work,
|
||||
qdf_defer_fn_t func, void *arg)
|
||||
static inline QDF_STATUS
|
||||
__qdf_init_work(__qdf_work_t *work, qdf_defer_fn_t func, void *arg)
|
||||
{
|
||||
/*Initilize func and argument in work struct */
|
||||
INIT_WORK(&work->work, __qdf_defer_func);
|
||||
@@ -100,15 +98,14 @@ static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl,
|
||||
/**
|
||||
* __qdf_init_delayed_work - create a work/task, This runs in non-interrupt
|
||||
* context, so can be preempted by H/W & S/W intr
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to work
|
||||
* @func: deferred function to run at bottom half non-interrupt context.
|
||||
* @arg: argument for the deferred function
|
||||
* Return: none
|
||||
*/
|
||||
static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work,
|
||||
qdf_defer_fn_t func, void *arg)
|
||||
static inline uint32_t __qdf_init_delayed_work(__qdf_delayed_work_t *work,
|
||||
qdf_defer_fn_t func,
|
||||
void *arg)
|
||||
{
|
||||
INIT_WORK(work, func, arg);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -116,28 +113,24 @@ static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl,
|
||||
|
||||
/**
|
||||
* __qdf_queue_work - Queue the work/task
|
||||
* @hdl: OS handle
|
||||
* @wqueue: pointer to workqueue
|
||||
* @work: pointer to work
|
||||
* Return: none
|
||||
*/
|
||||
static inline void __qdf_queue_work(qdf_handle_t hdl,
|
||||
__qdf_workqueue_t *wqueue,
|
||||
__qdf_work_t *work)
|
||||
static inline void
|
||||
__qdf_queue_work(__qdf_workqueue_t *wqueue, __qdf_work_t *work)
|
||||
{
|
||||
queue_work(wqueue, work);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_queue_delayed_work - Queue the delayed work/task
|
||||
* @hdl: OS handle
|
||||
* @wqueue: pointer to workqueue
|
||||
* @work: pointer to work
|
||||
* @delay: delay interval
|
||||
* Return: none
|
||||
*/
|
||||
static inline void __qdf_queue_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_workqueue_t *wqueue,
|
||||
static inline void __qdf_queue_delayed_work(__qdf_workqueue_t *wqueue,
|
||||
__qdf_delayed_work_t *work,
|
||||
uint32_t delay)
|
||||
{
|
||||
@@ -146,11 +139,10 @@ static inline void __qdf_queue_delayed_work(qdf_handle_t hdl,
|
||||
|
||||
/**
|
||||
* __qdf_sched_work - Schedule a deferred task on non-interrupt context
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to work
|
||||
* Retrun: none
|
||||
*/
|
||||
static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
static inline QDF_STATUS __qdf_sched_work(__qdf_work_t *work)
|
||||
{
|
||||
schedule_work(work);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -158,14 +150,12 @@ static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
|
||||
/**
|
||||
* __qdf_sched_delayed_work() - Schedule a delayed work
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to delayed work
|
||||
* @delay: delay interval
|
||||
* Return: none
|
||||
*/
|
||||
static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work,
|
||||
uint32_t delay)
|
||||
static inline QDF_STATUS
|
||||
__qdf_sched_delayed_work(__qdf_delayed_work_t *work, uint32_t delay)
|
||||
{
|
||||
schedule_delayed_work(work, msecs_to_jiffies(delay));
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -173,35 +163,30 @@ static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl,
|
||||
|
||||
/**
|
||||
* __qdf_cancel_work() - Cancel a work
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to work
|
||||
* Return: true if work was pending, false otherwise
|
||||
*/
|
||||
static inline bool __qdf_cancel_work(qdf_handle_t hdl,
|
||||
__qdf_work_t *work)
|
||||
static inline bool __qdf_cancel_work(__qdf_work_t *work)
|
||||
{
|
||||
return cancel_work_sync(work);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_cancel_delayed_work() - Cancel a delayed work
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to delayed work
|
||||
* Return: true if work was pending, false otherwise
|
||||
*/
|
||||
static inline bool __qdf_cancel_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work)
|
||||
static inline bool __qdf_cancel_delayed_work(__qdf_delayed_work_t *work)
|
||||
{
|
||||
return cancel_delayed_work_sync(work);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_flush_work - Flush a deferred task on non-interrupt context
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to work
|
||||
* Return: none
|
||||
*/
|
||||
static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
static inline uint32_t __qdf_flush_work(__qdf_work_t *work)
|
||||
{
|
||||
flush_work(work);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -209,21 +194,18 @@ static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
|
||||
/**
|
||||
* __qdf_flush_delayed_work() - Flush a delayed work
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to delayed work
|
||||
* Return: none
|
||||
*/
|
||||
static inline uint32_t __qdf_flush_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work)
|
||||
static inline uint32_t __qdf_flush_delayed_work(__qdf_delayed_work_t *work)
|
||||
{
|
||||
flush_delayed_work(work);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl,
|
||||
__qdf_work_t *work,
|
||||
qdf_defer_fn_t func, void *arg)
|
||||
static inline QDF_STATUS
|
||||
__qdf_init_work(__qdf_work_t *work, qdf_defer_fn_t func, void *arg)
|
||||
{
|
||||
work->fn = func;
|
||||
work->arg = arg;
|
||||
@@ -231,9 +213,9 @@ static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work,
|
||||
qdf_defer_fn_t func, void *arg)
|
||||
static inline uint32_t __qdf_init_delayed_work(__qdf_delayed_work_t *work,
|
||||
qdf_defer_fn_t func,
|
||||
void *arg)
|
||||
{
|
||||
/*Initilize func and argument in work struct */
|
||||
work->fn = func;
|
||||
@@ -242,54 +224,49 @@ static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline void __qdf_queue_work(qdf_handle_t hdl,
|
||||
__qdf_workqueue_t *wqueue,
|
||||
__qdf_work_t *work)
|
||||
static inline void
|
||||
__qdf_queue_work(__qdf_workqueue_t *wqueue, __qdf_work_t *work)
|
||||
{
|
||||
queue_work(wqueue, &work->work);
|
||||
}
|
||||
|
||||
static inline void __qdf_queue_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_workqueue_t *wqueue,
|
||||
static inline void __qdf_queue_delayed_work(__qdf_workqueue_t *wqueue,
|
||||
__qdf_delayed_work_t *work,
|
||||
uint32_t delay)
|
||||
{
|
||||
queue_delayed_work(wqueue, &work->dwork, msecs_to_jiffies(delay));
|
||||
}
|
||||
|
||||
static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
static inline QDF_STATUS __qdf_sched_work(__qdf_work_t *work)
|
||||
{
|
||||
schedule_work(&work->work);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work,
|
||||
uint32_t delay)
|
||||
static inline QDF_STATUS
|
||||
__qdf_sched_delayed_work(__qdf_delayed_work_t *work, uint32_t delay)
|
||||
{
|
||||
schedule_delayed_work(&work->dwork, msecs_to_jiffies(delay));
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline bool __qdf_cancel_work(qdf_handle_t hdl,
|
||||
__qdf_work_t *work)
|
||||
static inline bool __qdf_cancel_work(__qdf_work_t *work)
|
||||
{
|
||||
return cancel_work_sync(&work->work);
|
||||
}
|
||||
|
||||
static inline bool __qdf_cancel_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work)
|
||||
static inline bool __qdf_cancel_delayed_work(__qdf_delayed_work_t *work)
|
||||
{
|
||||
return cancel_delayed_work_sync(&work->dwork);
|
||||
}
|
||||
|
||||
static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
static inline uint32_t __qdf_flush_work(__qdf_work_t *work)
|
||||
{
|
||||
flush_work(&work->work);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
static inline uint32_t __qdf_flush_delayed_work(qdf_handle_t hdl,
|
||||
__qdf_delayed_work_t *work)
|
||||
|
||||
static inline uint32_t __qdf_flush_delayed_work(__qdf_delayed_work_t *work)
|
||||
{
|
||||
flush_delayed_work(&work->dwork);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -325,39 +302,33 @@ static inline __qdf_workqueue_t *__qdf_create_singlethread_workqueue(char *name)
|
||||
|
||||
/**
|
||||
* __qdf_flush_workqueue - flush the workqueue
|
||||
* @hdl: OS handle
|
||||
* @wqueue: pointer to workqueue
|
||||
* Return: none
|
||||
*/
|
||||
static inline void __qdf_flush_workqueue(qdf_handle_t hdl,
|
||||
__qdf_workqueue_t *wqueue)
|
||||
static inline void __qdf_flush_workqueue(__qdf_workqueue_t *wqueue)
|
||||
{
|
||||
flush_workqueue(wqueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_destroy_workqueue - Destroy the workqueue
|
||||
* @hdl: OS handle
|
||||
* @wqueue: pointer to workqueue
|
||||
* Return: none
|
||||
*/
|
||||
static inline void __qdf_destroy_workqueue(qdf_handle_t hdl,
|
||||
__qdf_workqueue_t *wqueue)
|
||||
static inline void __qdf_destroy_workqueue(__qdf_workqueue_t *wqueue)
|
||||
{
|
||||
destroy_workqueue(wqueue);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_init_bh - creates the Bottom half deferred handler
|
||||
* @hdl: OS handle
|
||||
* @bh: pointer to bottom
|
||||
* @func: deferred function to run at bottom half interrupt context.
|
||||
* @arg: argument for the deferred function
|
||||
* Return: none
|
||||
*/
|
||||
static inline QDF_STATUS __qdf_init_bh(qdf_handle_t hdl,
|
||||
struct tasklet_struct *bh,
|
||||
qdf_defer_fn_t func, void *arg)
|
||||
static inline QDF_STATUS
|
||||
__qdf_init_bh(struct tasklet_struct *bh, qdf_defer_fn_t func, void *arg)
|
||||
{
|
||||
tasklet_init(bh, (__qdf_bh_fn_t) func, (unsigned long)arg);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -369,12 +340,10 @@ static inline QDF_STATUS __qdf_init_bh(qdf_handle_t hdl,
|
||||
|
||||
/**
|
||||
* __qdf_sched_bh - schedule a bottom half (DPC)
|
||||
* @hdl: OS handle
|
||||
* @bh: pointer to bottom
|
||||
* Return: none
|
||||
*/
|
||||
static inline QDF_STATUS
|
||||
__qdf_sched_bh(qdf_handle_t hdl, struct tasklet_struct *bh)
|
||||
static inline QDF_STATUS __qdf_sched_bh(struct tasklet_struct *bh)
|
||||
{
|
||||
tasklet_schedule(bh);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -382,12 +351,10 @@ __qdf_sched_bh(qdf_handle_t hdl, struct tasklet_struct *bh)
|
||||
|
||||
/**
|
||||
* __qdf_disable_work - disable the deferred task (synchronous)
|
||||
* @hdl: OS handle
|
||||
* @work: pointer to work
|
||||
* Return: unsigned int
|
||||
*/
|
||||
static inline QDF_STATUS
|
||||
__qdf_disable_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
static inline QDF_STATUS __qdf_disable_work(__qdf_work_t *work)
|
||||
{
|
||||
if (cancel_work_sync(&work->work))
|
||||
return QDF_STATUS_E_ALREADY;
|
||||
@@ -397,12 +364,10 @@ __qdf_disable_work(qdf_handle_t hdl, __qdf_work_t *work)
|
||||
|
||||
/**
|
||||
* __qdf_disable_bh - destroy the bh (synchronous)
|
||||
* @hdl: OS handle
|
||||
* @bh: pointer to bottom
|
||||
* Return: none
|
||||
*/
|
||||
static inline QDF_STATUS
|
||||
__qdf_disable_bh(qdf_handle_t hdl, struct tasklet_struct *bh)
|
||||
static inline QDF_STATUS __qdf_disable_bh(struct tasklet_struct *bh)
|
||||
{
|
||||
tasklet_kill(bh);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
Reference in New Issue
Block a user