staging: r8188eu: remove ODM_RT_ASSERT macro definition and caller
authorPhillip Potter <phil@philpotter.co.uk>
Sat, 31 Jul 2021 00:39:26 +0000 (01:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Jul 2021 07:21:42 +0000 (09:21 +0200)
Remove ODM_RT_ASSERT macro definition from include/odm_debug.h and
its one caller in hal/odm.c, as this debug code is against best
practice.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210731003937.68615-4-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/odm.c
drivers/staging/r8188eu/include/odm_debug.h

index 49e4c8bfc6ef80d1e000b450e663440446ea60b0..9ddd8c94cc98d3ef80c8fb45168a8a3bf5bd106b 100644 (file)
@@ -1373,7 +1373,6 @@ bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI, bool bForceUpdate
                LowRSSIThreshForRA += GoUpGap;
                break;
        default:
-               ODM_RT_ASSERT(pDM_Odm, false, ("wrong rssi level setting %d !", *pRATRState));
                break;
        }
 
index 73fdea5987075dcfc0cebb30088ebaaf9664705a..c11d8925952cfd9e3b1aa475c3f4fd012aff95b5 100644 (file)
                RT_PRINTK fmt;                                          \
        }
 
-#define ODM_RT_ASSERT(pDM_Odm, expr, fmt)                              \
-       if (!(expr)) {                                                  \
-               DbgPrint( "Assertion failed! %s at ......\n", #expr);   \
-               DbgPrint( "      ......%s,%s,line=%d\n", __FILE__,      \
-                       __func__, __LINE__);                            \
-               RT_PRINTK fmt;                                          \
-               ASSERT(false);                                          \
-       }
-
 void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);
 
 #endif /*  __ODM_DBG_H__ */