فهرست منبع

qcacmn: change the return type of qdf_queue_work to bool

Currently the return type of qdf_queue_work is void,
whereas queue_work return type is bool denoting the status,
so changing the return type of qdf_queue_work to bool,
helps to check the status of the function.

Change-Id: Ifd07923a18641790314b88d38a7eba2a73e498b3
CRs-Fixed: 2876197
Vevek Venkatesan 4 سال پیش
والد
کامیت
fdf0a167e5
3فایلهای تغییر یافته به همراه10 افزوده شده و 10 حذف شده
  1. 5 5
      qdf/inc/qdf_defer.h
  2. 4 4
      qdf/linux/src/i_qdf_defer.h
  3. 1 1
      qdf/linux/src/qdf_defer.c

+ 5 - 5
qdf/inc/qdf_defer.h

@@ -175,9 +175,9 @@ void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work);
  * @wqueue: pointer to workqueue
  * @work: pointer to work
  *
- * Return: none
+ * Return: false if work was already on a queue, true otherwise
  */
-void
+bool
 qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work);
 
 /**
@@ -303,12 +303,12 @@ static inline qdf_workqueue_t *qdf_alloc_unbound_workqueue(char *name)
  * @hdl: OS handle
  * @wqueue: pointer to workqueue
  * @work: pointer to work
- * Return: none
+ * Return: false if work was already on a queue, true otherwise
  */
-static inline void
+static inline bool
 qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work)
 {
-	return  __qdf_queue_work(wqueue, work);
+	return __qdf_queue_work(wqueue, work);
 }
 
 /**

+ 4 - 4
qdf/linux/src/i_qdf_defer.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2021 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
@@ -70,12 +70,12 @@ __qdf_init_work(__qdf_work_t *work, qdf_defer_fn_t func, void *arg)
  * __qdf_queue_work - Queue the work/task
  * @wqueue: pointer to workqueue
  * @work: pointer to work
- * Return: none
+ * Return: false if work was already on a queue, true otherwise
  */
-static inline void
+static inline bool
 __qdf_queue_work(__qdf_workqueue_t *wqueue, __qdf_work_t *work)
 {
-	queue_work(wqueue, &work->work);
+	return queue_work(wqueue, &work->work);
 }
 
 /**

+ 1 - 1
qdf/linux/src/qdf_defer.c

@@ -137,7 +137,7 @@ void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work)
 
 qdf_export_symbol(qdf_sched_work);
 
-void
+bool
 qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work)
 {
 	return  __qdf_queue_work(wqueue, work);