[bug report] RDMA/rxe: Rewrite rxe_task.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Bob Pearson,

The patch d94671632572: "RDMA/rxe: Rewrite rxe_task.c" from Mar 4,
2023, leads to the following Smatch static checker warning:

	drivers/infiniband/sw/rxe/rxe_task.c:24 __reserve_if_idle()
	warn: bitwise AND condition is false here

drivers/infiniband/sw/rxe/rxe_task.c
    20 static bool __reserve_if_idle(struct rxe_task *task)
    21 {
    22         WARN_ON(rxe_read(task->qp) <= 0);
    23 
--> 24         if (task->tasklet.state & TASKLET_STATE_SCHED)
                                         ^^^^^^^^^^^^^^^^^^^
This is zero.  Should the check be == TASKLET_STATE_SCHED?

    25                 return false;
    26 
    27         if (task->state == TASK_STATE_IDLE) {
    28                 rxe_get(task->qp);
    29                 task->state = TASK_STATE_BUSY;
    30                 task->num_sched++;
    31                 return true;
    32         }
    33 
    34         if (task->state == TASK_STATE_BUSY)
    35                 task->state = TASK_STATE_ARMED;
    36 
    37         return false;
    38 }

regards,
dan carpenter



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux