diff options
author | Ralph Campbell <ralphc@pathscale.com> | 2006-02-03 14:32:01 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-03-20 10:08:11 -0800 |
commit | 5e9f71a16c56af7e2ff8b7ea251e0fd90b5de560 (patch) | |
tree | d3b6aba0640173d0ce760140650dad51a76f9501 /drivers/infiniband/core/agent.c | |
parent | 5f0b67e0d5c2807337b8fee4aa71b05f4f641534 (diff) |
IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp()
The call to ib_get_agent_port() shouldn't be possible to fail when
smi_check_local_dr_smp() is called from ib_mad_recv_done_handler().
When it is called from handle_outgoing_dr_smp(), the device and
port_num come from mad_agent_priv so I assume the call to
ib_get_agent_port() shouldn't fail either. In either case,
smi_check_local_smp() only uses the mad_agent pointer to check that
mad_agent->device->process_mad is not NULL. The device pointer would
have to be the same as the one passed to smi_check_local_dr_smp()
since that pointer is used later instead of the one checked in
smi_check_local_smp().
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/agent.c')
-rw-r--r-- | drivers/infiniband/core/agent.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c index 1a8f9458836..ecd1a3057c6 100644 --- a/drivers/infiniband/core/agent.c +++ b/drivers/infiniband/core/agent.c @@ -78,22 +78,6 @@ ib_get_agent_port(struct ib_device *device, int port_num) return entry; } -int smi_check_local_dr_smp(struct ib_smp *smp, - struct ib_device *device, - int port_num) -{ - struct ib_agent_port_private *port_priv; - - port_priv = ib_get_agent_port(device, port_num); - if (!port_priv) { - printk(KERN_DEBUG SPFX "smi_check_local_dr_smp %s port %d " - "not open\n", device->name, port_num); - return 1; - } - - return smi_check_local_smp(port_priv->agent[0], smp); -} - int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, struct ib_wc *wc, struct ib_device *device, int port_num, int qpn) |