Hi Alex, If the assert is incorrect, then the print following it is also incorrect. I would rather see the assertion extended to cover the other valid states - assertions are a very useful way to document the code so that people can understand the assumptions made in functions regarding the state. It also will fire if those assumptions are wrong and the code needs to be revised.
-Fab From: [email protected] [mailto:[email protected]] On Behalf Of Alex Naslednikov Sent: Tuesday, November 02, 2010 2:33 AM To: [email protected] Subject: [ofw] [Patch][IPoIB_NDIS6_CM] Remove obsolete ASSERT Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp =================================================================== --- ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp (revision 2982) +++ ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp (working copy) @@ -3303,7 +3303,6 @@ shutter_shut( &p_adapter->recv_shutter ); // Notify that shutter was already shut p_adapter->ipoib_state |= IPOIB_RESET_OR_DOWN; - ASSERT( p_adapter->ipoib_state == IPOIB_RUNNING ); IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER, ("ipoib_state was IPOIB_RUNNING and IPOIB_RESET_OR_DOWN flag was set\n") ); } Alexander (XaleX) Naslednikov SW Networking Team Mellanox Technologies
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
