General MAD clean up
cover General MAD clean up
From: Ira Weiny <[email protected]>
Resend due to Patchwork being reset. Also added Jason's Reviewed-By and Sean's Acked-By lines.
These 2 patches contain some clean ups to the MAD module. One was reviewed months ago by Sean and the other was suggested by Doug.
These are based on Doug's for-4.2 branch
Ira Weiny (2):
IB/mad: Rename is_data_mad to is_rmpp_data_mad
IB/mad: Clean up comments in smi.c
drivers/infiniband/core/mad.c | 7 ++++--- drivers/infiniband/core/smi.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-)
Signature · 6 lines
1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1431105004-23585-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
PATCH RESEND 1/2 IB/mad: Rename is_data_mad to is_rmpp_data_mad
From: Ira Weiny <[email protected]>
is_rmpp_data_mad is more descriptive for this function.
--- drivers/infiniband/core/mad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/infiniband/core/mad.c +4 -3
@@ -1734,7 +1734,7 @@ out:return valid; } -static int is_data_mad (struct ib_mad_agent_private *mad_agent_priv, +static int is_rmpp_data_mad (struct ib_mad_agent_private *mad_agent_priv,struct ib_mad_hdr *mad_hdr) {struct ib_rmpp_mad *rmpp_mad;
@@ -1836,7 +1836,7 @@ ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv,* been notified that the send has completed */ list_for_each_entry (wr, &mad_agent_priv->send_list, agent_list) { - if (is_data_mad(mad_agent_priv, wr->send_buf.mad) && + if (is_rmpp_data_mad(mad_agent_priv, wr->send_buf.mad) && wr->tid == mad->mad_hdr.tid && wr->timeout && rcv_has_same_class(wr, wc) &&
@@ -2411,7 +2411,8 @@ find_send_wr(struct ib_mad_agent_private *mad_agent_priv,list_for_each_entry (mad_send_wr, &mad_agent_priv->send_list, agent_list) { -if (is_data_mad (mad_agent_priv, mad_send_wr->send_buf.mad) && +if (is_rmpp_data_mad (mad_agent_priv, + mad_send_wr->send_buf.mad) && &mad_send_wr->send_buf == send_buf)return mad_send_wr; }
Signature · 6 lines
1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 IB/mad: Clean up comments in smi.c
In reply to a message not in the archiveFrom: Ira Weiny <[email protected]>
Return values of 0 do not make sense for functions which return enum smi_action
--- drivers/infiniband/core/smi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/smi.c +2 -2
@@ -41,7 +41,7 @@/* * Fixup a directed route SMP for sending -* Return 0 if the SMP should be discarded +* Return IB_SMI_DISCARD if the SMP should be discarded */ enum smi_action smi_handle_dr_smp_send (struct ib_smp *smp,u8 node_type,int port_num)
@@ -126,7 +126,7 @@ enum smi_action smi_handle_dr_smp_send(struct ib_smp *smp,/* * Adjust information for a received SMP -* Return 0 if the SMP should be dropped +* Return IB_SMI_DISCARD if the SMP should be dropped */ enum smi_action smi_handle_dr_smp_recv (struct ib_smp *smp,u8 node_type,int port_num,int phys_port_cnt)
Signature · 6 lines
1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · On Fri, 2015-05-08 at 13:10 -0400, [email protected]…
From: Ira Weiny <[email protected]>
Resend due to Patchwork being reset. Also added Jason's Reviewed-By and Sean's Acked-By lines.
These 2 patches contain some clean ups to the MAD module. One was reviewed months ago by Sean and the other was suggested by Doug.
These are based on Doug's for-4.2 branch
Quoted 8 lines
Ira Weiny (2):
IB/mad: Renameis_data_madtois_rmpp_data_mad
IB/mad: Clean up comments insmi.cdrivers/infiniband/core/mad.c | 7 ++++--- drivers/infiniband/core/smi.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-)
These have been picked up for 4.2.
Signature · 2 lines
Doug Ledford <[email protected]> GPG KeyID: 0E572FDD