Skip to content

Commit 67a00d2

Browse files
rpearsonhpe-designjgunthorpe
authored andcommitted
RDMA/rxe: Fix incorrect TASKLET_STATE_SCHED check in rxe_task.c
In a previous patch TASKLET_STATE_SCHED was used as a mask but it is a bit position instead. Add the missing shift. Link: https://lore.kernel.org/r/20230329193308.7489-1-rpearsonhpe@gmail.com Reported-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/linux-rdma/8a054b78-6d50-4bc6-8d8a-83f85fbdb82f@kili.mountain/ Fixes: d946716 ("RDMA/rxe: Rewrite rxe_task.c") Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 866694a commit 67a00d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/infiniband/sw/rxe/rxe_task.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static bool __reserve_if_idle(struct rxe_task *task)
2121
{
2222
WARN_ON(rxe_read(task->qp) <= 0);
2323

24-
if (task->tasklet.state & TASKLET_STATE_SCHED)
24+
if (task->tasklet.state & BIT(TASKLET_STATE_SCHED))
2525
return false;
2626

2727
if (task->state == TASK_STATE_IDLE) {
@@ -46,7 +46,7 @@ static bool __reserve_if_idle(struct rxe_task *task)
4646
*/
4747
static bool __is_done(struct rxe_task *task)
4848
{
49-
if (task->tasklet.state & TASKLET_STATE_SCHED)
49+
if (task->tasklet.state & BIT(TASKLET_STATE_SCHED))
5050
return false;
5151

5252
if (task->state == TASK_STATE_IDLE ||

0 commit comments

Comments
 (0)