[ofw] [Patch][IPoIB_NDIS6_CM] Remove obsolete ASSERT

Fab Tillier ftillier at microsoft.com
Tue Nov 2 10:08:38 PDT 2010


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: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex Naslednikov
Sent: Tuesday, November 02, 2010 2:33 AM
To: ofw at lists.openfabrics.org
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101102/f0e93cd8/attachment.html>


More information about the ofw mailing list