Convert the private helper _rtw_enqueue_cmd() to return 0 on
success instead of the legacy _SUCCESS value.
Keep rtw_enqueue_cmd() translating the result back to the
existing return convention for now.
No functional change intended.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20260513213719.12246-5-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
unsigned long irqL;
if (!obj)
- return _SUCCESS;
+ return 0;
/* spin_lock_bh(&queue->lock); */
spin_lock_irqsave(&queue->lock, irqL);
/* spin_unlock_bh(&queue->lock); */
spin_unlock_irqrestore(&queue->lock, irqL);
- return _SUCCESS;
+ return 0;
}
struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
res = _rtw_enqueue_cmd(&pcmdpriv->cmd_queue, cmd_obj);
- if (res == _SUCCESS)
+ if (res == 0) {
complete(&pcmdpriv->cmd_queue_comp);
+ return _SUCCESS;
+ }
- return res;
+ return _FAIL;
}
struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)