Minor patch to remove a branch, jump, and stack variable.

Index: ib_mad.c
===================================================================
--- ib_mad.c    (revision 880)
+++ ib_mad.c    (working copy)
@@ -584,30 +584,22 @@
 static int response_mad(struct ib_mad *mad)
 {
        /* Trap represses are responses although response bit is reset */
-       if ((mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) || 
-           (mad->mad_hdr.method & IB_MGMT_METHOD_RESP)) {
-               return 1;
-       }
-       return 0;
+       return ((mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) || 
+               (mad->mad_hdr.method & IB_MGMT_METHOD_RESP));
 }
 
 static int solicited_mad(struct ib_mad *mad)
 {
-       int solicited = 0;
-
        /* CM MADs are never solicited */
        if (mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_CM) {
-               goto ret;
+               return 0;
        }
 
        /* Determine whether MAD is using RMPP !!! */
 
        /* Not using RMPP */
        /* Is this MAD a response to a previous MAD ? */
-       solicited = response_mad(mad);
-
-ret:
-       return solicited;
+       return response_mad(mad);
 }
 
 static struct ib_mad_agent_private *find_mad_agent(struct ib_mad_port_private 
*port_priv,


-- 
_______________________________________________
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to