IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp()
authorRalph Campbell <ralphc@pathscale.com>
Fri, 3 Feb 2006 22:32:01 +0000 (14:32 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 20 Mar 2006 18:08:11 +0000 (10:08 -0800)
commit5e9f71a16c56af7e2ff8b7ea251e0fd90b5de560
treed3b6aba0640173d0ce760140650dad51a76f9501
parent5f0b67e0d5c2807337b8fee4aa71b05f4f641534
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>
drivers/infiniband/core/agent.c
drivers/infiniband/core/mad.c
drivers/infiniband/core/smi.h