This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4c07d006d19bcdb9dfa47f579167157d61e10457 Author: fangxinyong <[email protected]> AuthorDate: Wed Mar 4 16:52:01 2026 +0800 drivers/rpmsg: skip comparing a work queue with itself In rpmsg_queue_work() the first loop iteration compares wqueues[0] against wqueues[idx] with idx == 0, which can never select it. Skip the comparison when i == idx. No functional change; this silences a Coverity "operand does not affect the result" report. Signed-off-by: fangxinyong <[email protected]> --- drivers/rpmsg/rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg.c b/drivers/rpmsg/rpmsg.c index 1cb7a3d4f33..d319f56b3ba 100644 --- a/drivers/rpmsg/rpmsg.c +++ b/drivers/rpmsg/rpmsg.c @@ -1065,7 +1065,7 @@ int rpmsg_queue_work(FAR struct rpmsg_s *rpmsg, int priority, break; } - if (abs(priority - wqueues[i].priority) < + if (i != idx && abs(priority - wqueues[i].priority) < abs(priority - wqueues[idx].priority)) { idx = i;
