Remove the ASSERT macro from timskmod.h, and replace its single use with
WARN_ON() instead.

Signed-off-by: Benjamin Romer <benjamin.ro...@unisys.com>
---
v2 - Fixed a mistake where some of the if statements had accidentally doubled
tabs when the then clause was only one statement.

v3 - Fixed the doubled tabs missed in v2, and added a patch for removing the
ASSERT() macro.

v4 - Fixed a line that was incorrectly removed, reversed the test in WARN_ON(),
removed a redundant atomic_read(), and fixed an accidental behavior change where
removing the error printout changed the flow of a function.

 drivers/staging/unisys/include/timskmod.h        | 9 ---------
 drivers/staging/unisys/visorutil/periodic_work.c | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/staging/unisys/include/timskmod.h 
b/drivers/staging/unisys/include/timskmod.h
index ff0fc16..667eae6 100644
--- a/drivers/staging/unisys/include/timskmod.h
+++ b/drivers/staging/unisys/include/timskmod.h
@@ -68,15 +68,6 @@
 #define HOSTADDRESS unsigned long long
 #endif
 
-/** Try to evaulate the provided expression, and do a RETINT(x) iff
- *  the expression evaluates to < 0.
- */
-#define ASSERT(cond)                                           \
-       do { if (!(cond))                                      \
-                       HUHDRV("ASSERT failed - %s",           \
-                              __stringify(cond));             \
-       } while (0)
-
 #define sizeofmember(TYPE, MEMBER) (sizeof(((TYPE *)0)->MEMBER))
 /** "Covered quotient" function */
 #define COVQ(v, d)  (((v) + (d) - 1) / (d))
diff --git a/drivers/staging/unisys/visorutil/periodic_work.c 
b/drivers/staging/unisys/visorutil/periodic_work.c
index 0908bf9..411fd1e 100644
--- a/drivers/staging/unisys/visorutil/periodic_work.c
+++ b/drivers/staging/unisys/visorutil/periodic_work.c
@@ -182,7 +182,7 @@ BOOL visor_periodic_work_stop(struct periodic_work *pw)
                        /* We get here if the delayed work was pending as
                         * delayed work, but was NOT run.
                         */
-                       ASSERT(pw->is_scheduled);
+                       WARN_ON(!pw->is_scheduled);
                        pw->is_scheduled = FALSE;
                } else {
                        /* If we get here, either the delayed work:
-- 
2.1.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to