Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e78ae003 authored by Luo bin's avatar Luo bin Committed by Greg Kroah-Hartman
Browse files

hinic: fix a irq affinity bug



[ Upstream commit 0bff777bd0cba73ad4cd0145696ad284d7e6a99f ]

can not use a local variable as an input parameter of
irq_set_affinity_hint

Signed-off-by: default avatarLuo bin <luobin9@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 851346e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ struct hinic_rq {

	struct hinic_wq         *wq;

	struct cpumask		affinity_mask;
	u32                     irq;
	u16                     msix_entry;

+2 −3
Original line number Diff line number Diff line
@@ -414,7 +414,6 @@ static int rx_request_irq(struct hinic_rxq *rxq)
	struct hinic_hwdev *hwdev = nic_dev->hwdev;
	struct hinic_rq *rq = rxq->rq;
	struct hinic_qp *qp;
	struct cpumask mask;
	int err;

	rx_add_napi(rxq);
@@ -431,8 +430,8 @@ static int rx_request_irq(struct hinic_rxq *rxq)
	}

	qp = container_of(rq, struct hinic_qp, rq);
	cpumask_set_cpu(qp->q_id % num_online_cpus(), &mask);
	return irq_set_affinity_hint(rq->irq, &mask);
	cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask);
	return irq_set_affinity_hint(rq->irq, &rq->affinity_mask);
}

static void rx_free_irq(struct hinic_rxq *rxq)