From fdea3c7af7b243fa1977e93758c59c9938423f4b Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 5 Mar 2019 16:17:54 -0800 Subject: [PATCH] qcacmn: Remove qdf_delayed_work_t qdf_delayed_work_t has been superseded by qdf_delayed_work (via I76bc59dcd4222643d70c6a763e5bc4ee9f0a487c). Remove the now obsolete qdf_delayed_work_t. Change-Id: I4e50521b469dcf9e1782e9412729f197552ee408 CRs-Fixed: 2420191 --- qdf/inc/qdf_defer.h | 70 +------------------------------ qdf/linux/src/i_qdf_defer.h | 82 +------------------------------------ qdf/linux/src/qdf_defer.c | 19 --------- 3 files changed, 2 insertions(+), 169 deletions(-) diff --git a/qdf/inc/qdf_defer.h b/qdf/inc/qdf_defer.h index 2b0f418584..5a78b61acb 100644 --- a/qdf/inc/qdf_defer.h +++ b/qdf/inc/qdf_defer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -42,7 +42,6 @@ * Representation of a work queue. */ typedef __qdf_work_t qdf_work_t; -typedef __qdf_delayed_work_t qdf_delayed_work_t; typedef __qdf_workqueue_t qdf_workqueue_t; /* @@ -101,21 +100,6 @@ static inline QDF_STATUS qdf_create_work(qdf_handle_t hdl, qdf_work_t *work, return __qdf_init_work(work, func, arg); } -/** - * qdf_create_delayed_work - create a delayed work/task, This runs in - * non-interrupt context, so can be preempted by H/W & S/W intr - * @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 void qdf_create_delayed_work(qdf_delayed_work_t *work, - qdf_defer_fn_t func, - void *arg) -{ - __qdf_init_delayed_work(work, func, arg); -} - /** * qdf_create_workqueue - create a workqueue, This runs in non-interrupt * context, so can be preempted by H/W & S/W intr @@ -166,20 +150,6 @@ qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work) return __qdf_queue_work(wqueue, work); } -/** - * qdf_queue_delayed_work - Queue the delayed work/task - * @wqueue: pointer to workqueue - * @work: pointer to work - * @delay: delay interval in milliseconds - * Return: none - */ -static inline void qdf_queue_delayed_work(qdf_workqueue_t *wqueue, - qdf_delayed_work_t *work, - uint32_t delay) -{ - return __qdf_queue_delayed_work(wqueue, work, delay); -} - /** * qdf_flush_workqueue - flush the workqueue * @hdl: OS handle @@ -215,18 +185,6 @@ static inline void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work) __qdf_sched_work(work); } -/** - * qdf_sched_delayed_work() - Schedule a delayed task - * @work: pointer to delayed work - * @delay: delay interval in milliseconds - * Return: none - */ -static inline void -qdf_sched_delayed_work(qdf_delayed_work_t *work, uint32_t delay) -{ - __qdf_sched_delayed_work(work, delay); -} - /** * qdf_cancel_work() - Cancel a work * @work: pointer to work @@ -246,19 +204,6 @@ static inline bool qdf_cancel_work(qdf_work_t *work) return __qdf_cancel_work(work); } -/** - * qdf_cancel_delayed_work() - Cancel a delayed work - * @work: pointer to delayed work - * - * This is qdf_cancel_work for delayed works. - * - * Return: true if work was pending, false otherwise - */ -static inline bool qdf_cancel_delayed_work(qdf_delayed_work_t *work) -{ - return __qdf_cancel_delayed_work(work); -} - /** * qdf_flush_work - Flush a deferred task on non-interrupt context * @work: pointer to work @@ -273,19 +218,6 @@ static inline void qdf_flush_work(qdf_work_t *work) __qdf_flush_work(work); } -/** - * qdf_flush_delayed_work() - Flush a delayed work - * @work: pointer to delayed work - * - * This is qdf_flush_work for delayed works. - * - * Return: none - */ -static inline void qdf_flush_delayed_work(qdf_delayed_work_t *work) -{ - __qdf_flush_delayed_work(work); -} - /** * qdf_disable_work - disable the deferred task (synchronous) * @work: pointer to work diff --git a/qdf/linux/src/i_qdf_defer.h b/qdf/linux/src/i_qdf_defer.h index 28209f5ca9..79dd17713b 100644 --- a/qdf/linux/src/i_qdf_defer.h +++ b/qdf/linux/src/i_qdf_defer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -45,20 +45,7 @@ typedef struct { void *arg; } __qdf_work_t; -/** - * __qdf_delayed_work_t - wrapper around the real work func - * @dwork: Instance of delayed work - * @fn: function pointer to the handler - * @arg: pointer to argument - */ -typedef struct { - struct delayed_work dwork; - qdf_defer_fn_t fn; - void *arg; -} __qdf_delayed_work_t; - extern void __qdf_defer_func(struct work_struct *work); -extern void __qdf_defer_delayed_func(struct work_struct *work); typedef void (*__qdf_bh_fn_t)(unsigned long arg); @@ -79,25 +66,6 @@ __qdf_init_work(__qdf_work_t *work, qdf_defer_fn_t func, void *arg) return QDF_STATUS_SUCCESS; } -/** - * __qdf_init_delayed_work - create a work/task, This runs in non-interrupt - * context, so can be preempted by H/W & S/W intr - * @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_delayed_work_t *work, - qdf_defer_fn_t func, - void *arg) -{ - /*Initialize func and argument in work struct */ - work->fn = func; - work->arg = arg; - INIT_DELAYED_WORK(&work->dwork, __qdf_defer_delayed_func); - return QDF_STATUS_SUCCESS; -} - /** * __qdf_queue_work - Queue the work/task * @wqueue: pointer to workqueue @@ -110,20 +78,6 @@ __qdf_queue_work(__qdf_workqueue_t *wqueue, __qdf_work_t *work) queue_work(wqueue, &work->work); } -/** - * __qdf_queue_delayed_work - Queue the delayed work/task - * @wqueue: pointer to workqueue - * @work: pointer to work - * @delay: delay interval - * Return: none - */ -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)); -} - /** * __qdf_sched_work - Schedule a deferred task on non-interrupt context * @work: pointer to work @@ -135,19 +89,6 @@ static inline QDF_STATUS __qdf_sched_work(__qdf_work_t *work) return QDF_STATUS_SUCCESS; } -/** - * __qdf_sched_delayed_work() - Schedule a delayed work - * @work: pointer to delayed work - * @delay: delay interval - * Return: none - */ -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; -} - /** * __qdf_cancel_work() - Cancel a work * @work: pointer to work @@ -158,16 +99,6 @@ static inline bool __qdf_cancel_work(__qdf_work_t *work) return cancel_work_sync(&work->work); } -/** - * __qdf_cancel_delayed_work() - Cancel a delayed work - * @work: pointer to delayed work - * Return: true if work was pending, false otherwise - */ -static inline bool __qdf_cancel_delayed_work(__qdf_delayed_work_t *work) -{ - return cancel_delayed_work_sync(&work->dwork); -} - /** * __qdf_flush_work - Flush a deferred task on non-interrupt context * @work: pointer to work @@ -179,17 +110,6 @@ static inline uint32_t __qdf_flush_work(__qdf_work_t *work) return QDF_STATUS_SUCCESS; } -/** - * __qdf_flush_delayed_work() - Flush a delayed work - * @work: pointer to delayed work - * Return: none - */ -static inline uint32_t __qdf_flush_delayed_work(__qdf_delayed_work_t *work) -{ - flush_delayed_work(&work->dwork); - return QDF_STATUS_SUCCESS; -} - /** * __qdf_create_workqueue - create a workqueue, This runs in non-interrupt * context, so can be preempted by H/W & S/W intr diff --git a/qdf/linux/src/qdf_defer.c b/qdf/linux/src/qdf_defer.c index c6ac47780d..42f5af794b 100644 --- a/qdf/linux/src/qdf_defer.c +++ b/qdf/linux/src/qdf_defer.c @@ -47,22 +47,3 @@ void __qdf_defer_func(struct work_struct *work) } qdf_export_symbol(__qdf_defer_func); -/** - * __qdf_defer_delayed_func() - defer work handler - * @dwork: Pointer to defer work - * - * Return: none - */ -void -__qdf_defer_delayed_func(struct work_struct *dwork) -{ - __qdf_delayed_work_t *ctx = container_of(dwork, __qdf_delayed_work_t, - dwork.work); - if (!ctx->fn) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "BugCheck: Callback is not initilized while creating delayed work queue"); - return; - } - ctx->fn(ctx->arg); -} -qdf_export_symbol(__qdf_defer_delayed_func);