From 325e745bfa7e4d167e1185f1cebd663514330c49 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 21 Feb 2007 13:44:44 -0800 Subject: [PATCH] Remove device from ib_sa_port structure. We can get access to the device pointer through the MAD agent fields. --- drivers/infiniband/core/sa_query.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index 172a4504ebb..8ac32e6ccea 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -66,7 +66,6 @@ struct ib_sa_port { struct work_struct update_task; spinlock_t ah_lock; u8 port_num; - struct ib_device *device; }; struct ib_sa_device { @@ -1214,16 +1213,14 @@ static void notice_resp_handler(struct ib_mad_agent *agent, static void notice_handler(struct ib_mad_agent *mad_agent, struct ib_mad_recv_wc *mad_recv_wc) { - struct ib_sa_port *port; struct ib_sa_mad *mad; struct ib_sa_notice notice; - port = mad_agent->context; mad = (struct ib_sa_mad *) mad_recv_wc->recv_buf.mad; ib_unpack(notice_table, ARRAY_SIZE(notice_table), mad->data, ¬ice); - if (!notice_dispatch(port->device, port->port_num, ¬ice)) - ib_sa_notice_resp(port, mad_recv_wc); + if (!notice_dispatch(mad_agent->device, mad_agent->port_num, ¬ice)) + ib_sa_notice_resp(mad_agent->context, mad_recv_wc); ib_free_recv_mad(mad_recv_wc); } -- 2.46.0