From: Bob Pearson <rpearsonhpe@gmail.com>
To: Dan Carpenter <error27@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [bug report] RDMA/rxe: Rewrite rxe_task.c
Date: Wed, 29 Mar 2023 14:09:17 -0500 [thread overview]
Message-ID: <ea0968af-4c12-dbc3-6b5d-67def5e039d0@gmail.com> (raw)
In-Reply-To: <8a054b78-6d50-4bc6-8d8a-83f85fbdb82f@kili.mountain>
On 3/29/23 01:48, Dan Carpenter wrote:
> On Wed, Mar 29, 2023 at 09:27:26AM +0300, Dan Carpenter wrote:
>> 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?
>>
>
> The next function as well.
>
> drivers/infiniband/sw/rxe/rxe_task.c:49 __is_done() warn: bitwise AND condition is false here
>
> regards,
> dan carpenter
>
Good catch. I was trying to open code the test in tasklet_schedule which was
test_and_set_bit(TASKLET_STATE_SCHED, &t->state). I should have typed
if (task->tasklet.state & (1 << TASKLET_STATE_BIT)) or similar.
Thanks,
Bob
next prev parent reply other threads:[~2023-03-29 19:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 6:27 [bug report] RDMA/rxe: Rewrite rxe_task.c Dan Carpenter
2023-03-29 6:48 ` Dan Carpenter
2023-03-29 19:09 ` Bob Pearson [this message]
2023-03-29 19:17 ` Leon Romanovsky
2023-03-30 4:06 ` Dan Carpenter
2023-03-29 18:22 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea0968af-4c12-dbc3-6b5d-67def5e039d0@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=error27@gmail.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox