From: Bob Pearson <rpearsonhpe@gmail.com>
To: yanjun.zhu@linux.dev, jgg@ziepe.ca, leon@kernel.org,
linux-rdma@vger.kernel.org, zyjzyj2000@gmail.com
Subject: Re: [PATCH 3/3] RDMA/rxe: Remove the unused variable obj
Date: Mon, 22 Aug 2022 14:06:55 -0500 [thread overview]
Message-ID: <8d5fb124-c2fc-c191-3786-a243977774a8@gmail.com> (raw)
In-Reply-To: <20220822011615.805603-4-yanjun.zhu@linux.dev>
On 8/21/22 20:16, yanjun.zhu@linux.dev wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> The member variable obj in struct rxe_task is not needed.
> So remove it to save memory.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/sw/rxe/rxe_qp.c | 6 +++---
> drivers/infiniband/sw/rxe/rxe_task.c | 3 +--
> drivers/infiniband/sw/rxe/rxe_task.h | 3 +--
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
> index b229052ae91a..ee4f7a4a7e01 100644
> --- a/drivers/infiniband/sw/rxe/rxe_qp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_qp.c
> @@ -242,9 +242,9 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp,
>
> skb_queue_head_init(&qp->req_pkts);
>
> - rxe_init_task(rxe, &qp->req.task, qp,
> + rxe_init_task(&qp->req.task, qp,
> rxe_requester, "req");
> - rxe_init_task(rxe, &qp->comp.task, qp,
> + rxe_init_task(&qp->comp.task, qp,
> rxe_completer, "comp");
>
> qp->qp_timeout_jiffies = 0; /* Can't be set for UD/UC in modify_qp */
> @@ -292,7 +292,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp,
>
> skb_queue_head_init(&qp->resp_pkts);
>
> - rxe_init_task(rxe, &qp->resp.task, qp,
> + rxe_init_task(&qp->resp.task, qp,
> rxe_responder, "resp");
>
> qp->resp.opcode = OPCODE_NONE;
> diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
> index 2248cf33d776..ec2b7de1c497 100644
> --- a/drivers/infiniband/sw/rxe/rxe_task.c
> +++ b/drivers/infiniband/sw/rxe/rxe_task.c
> @@ -94,10 +94,9 @@ void rxe_do_task(struct tasklet_struct *t)
> task->ret = ret;
> }
>
> -int rxe_init_task(void *obj, struct rxe_task *task,
> +int rxe_init_task(struct rxe_task *task,
> void *arg, int (*func)(void *), char *name)
> {
> - task->obj = obj;
> task->arg = arg;
> task->func = func;
> snprintf(task->name, sizeof(task->name), "%s", name);
> diff --git a/drivers/infiniband/sw/rxe/rxe_task.h b/drivers/infiniband/sw/rxe/rxe_task.h
> index 11d183fd3338..7f612a1c68a7 100644
> --- a/drivers/infiniband/sw/rxe/rxe_task.h
> +++ b/drivers/infiniband/sw/rxe/rxe_task.h
> @@ -19,7 +19,6 @@ enum {
> * called again.
> */
> struct rxe_task {
> - void *obj;
> struct tasklet_struct tasklet;
> int state;
> spinlock_t state_lock; /* spinlock for task state */
> @@ -35,7 +34,7 @@ struct rxe_task {
> * arg => parameter to pass to fcn
> * func => function to call until it returns != 0
> */
> -int rxe_init_task(void *obj, struct rxe_task *task,
> +int rxe_init_task(struct rxe_task *task,
> void *arg, int (*func)(void *), char *name);
>
> /* cleanup task */
Looks OK to me. Not sure why that was ever there.
Reviewed-by: Bob Pearson <rpearsonhpe@gmail.com>
next prev parent reply other threads:[~2022-08-22 19:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 1:16 [PATCH 0/3] Fixes for syzbot problem yanjun.zhu
2022-08-22 1:16 ` [PATCH 1/3] RDMA/rxe: Fix "kernel NULL pointer dereference" error yanjun.zhu
2022-08-22 19:00 ` Bob Pearson
2022-08-23 5:43 ` lizhijian
2022-08-22 1:16 ` [PATCH 2/3] RDMA/rxe: Fix the error caused by qp->sk yanjun.zhu
2022-08-22 19:01 ` Bob Pearson
2022-08-23 5:53 ` lizhijian
2022-08-22 1:16 ` [PATCH 3/3] RDMA/rxe: Remove the unused variable obj yanjun.zhu
2022-08-22 19:06 ` Bob Pearson [this message]
2022-08-23 5:54 ` lizhijian
2022-08-29 14:59 ` [PATCH 0/3] Fixes for syzbot problem Yanjun Zhu
2022-08-31 6:54 ` 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=8d5fb124-c2fc-c191-3786-a243977774a8@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=yanjun.zhu@linux.dev \
--cc=zyjzyj2000@gmail.com \
/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