On Wed, Mar 29, 2023 at 02:33:09PM -0500, Bob Pearson wrote: > In a previous patch TASKLET_STATE_SCHED was used as a bit but it > is a bit position instead. This patch corrects that error. > > Reported-by: Dan Carpenter <error27@xxxxxxxxx> > Link: https://lore.kernel.org/linux-rdma/8a054b78-6d50-4bc6-8d8a-83f85fbdb82f@kili.mountain/ > Fixes: d94671632572 ("RDMA/rxe: Rewrite rxe_task.c") > Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx> > --- > drivers/infiniband/sw/rxe/rxe_task.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Like I said here https://lore.kernel.org/all/20230329191701.GG831478@unrealm Why didn't you used test_bit? Also please fix your commit message and title to clearly say what this patch is doing. "Fix error ..." is too broad. https://lore.kernel.org/all/1a6376525c40454282a14ab659de0b17b02fe523.1680113901.git.leon@xxxxxxxxxx/ Thanks > > diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c > index fea9a517c8d9..fb9a6bc8e620 100644 > --- a/drivers/infiniband/sw/rxe/rxe_task.c > +++ b/drivers/infiniband/sw/rxe/rxe_task.c > @@ -21,7 +21,7 @@ static bool __reserve_if_idle(struct rxe_task *task) > { > WARN_ON(rxe_read(task->qp) <= 0); > > - if (task->tasklet.state & TASKLET_STATE_SCHED) > + if (task->tasklet.state & BIT(TASKLET_STATE_SCHED)) > return false; > > if (task->state == TASK_STATE_IDLE) { > @@ -46,7 +46,7 @@ static bool __reserve_if_idle(struct rxe_task *task) > */ > static bool __is_done(struct rxe_task *task) > { > - if (task->tasklet.state & TASKLET_STATE_SCHED) > + if (task->tasklet.state & BIT(TASKLET_STATE_SCHED)) > return false; > > if (task->state == TASK_STATE_IDLE || > -- > 2.37.2 >