RDMA/rxe: Remove the unused variable obj
[ Upstream commit f07853582d1f6ed282f8d9a0b1209a87dd761f58 ] The member variable obj in struct rxe_task is not needed. So remove it to save memory. Link: https://lore.kernel.org/r/20220822011615.805603-4-yanjun.zhu@linux.dev Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Reviewed-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Stable-dep-of: 2a62b6210ce8 ("RDMA/rxe: Fix the use-before-initialization error of resp_pkts") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
46305daf80
commit
f99b6de58b
@ -278,9 +278,9 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp,
|
|||||||
|
|
||||||
skb_queue_head_init(&qp->req_pkts);
|
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_requester, "req");
|
||||||
rxe_init_task(rxe, &qp->comp.task, qp,
|
rxe_init_task(&qp->comp.task, qp,
|
||||||
rxe_completer, "comp");
|
rxe_completer, "comp");
|
||||||
|
|
||||||
qp->qp_timeout_jiffies = 0; /* Can't be set for UD/UC in modify_qp */
|
qp->qp_timeout_jiffies = 0; /* Can't be set for UD/UC in modify_qp */
|
||||||
@ -327,7 +327,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp,
|
|||||||
|
|
||||||
skb_queue_head_init(&qp->resp_pkts);
|
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");
|
rxe_responder, "resp");
|
||||||
|
|
||||||
qp->resp.opcode = OPCODE_NONE;
|
qp->resp.opcode = OPCODE_NONE;
|
||||||
|
@ -114,10 +114,9 @@ void rxe_do_task(unsigned long data)
|
|||||||
task->ret = ret;
|
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)
|
void *arg, int (*func)(void *), char *name)
|
||||||
{
|
{
|
||||||
task->obj = obj;
|
|
||||||
task->arg = arg;
|
task->arg = arg;
|
||||||
task->func = func;
|
task->func = func;
|
||||||
snprintf(task->name, sizeof(task->name), "%s", name);
|
snprintf(task->name, sizeof(task->name), "%s", name);
|
||||||
|
@ -46,7 +46,6 @@ enum {
|
|||||||
* called again.
|
* called again.
|
||||||
*/
|
*/
|
||||||
struct rxe_task {
|
struct rxe_task {
|
||||||
void *obj;
|
|
||||||
struct tasklet_struct tasklet;
|
struct tasklet_struct tasklet;
|
||||||
int state;
|
int state;
|
||||||
spinlock_t state_lock; /* spinlock for task state */
|
spinlock_t state_lock; /* spinlock for task state */
|
||||||
@ -62,7 +61,7 @@ struct rxe_task {
|
|||||||
* arg => parameter to pass to fcn
|
* arg => parameter to pass to fcn
|
||||||
* fcn => function to call until it returns != 0
|
* fcn => 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);
|
void *arg, int (*func)(void *), char *name);
|
||||||
|
|
||||||
/* cleanup task */
|
/* cleanup task */
|
||||||
|
Loading…
Reference in New Issue
Block a user