lkml.org 
[lkml]   [2020]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 23/23] ALSA: asihpi: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code
Date
Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT()
may be realized through them, thus reducing code redundancy and
facilitating problem analysis.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
---
sound/pci/asihpi/hpidebug.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sound/pci/asihpi/hpidebug.h b/sound/pci/asihpi/hpidebug.h
index c24ed69..b65c8dc 100644
--- a/sound/pci/asihpi/hpidebug.h
+++ b/sound/pci/asihpi/hpidebug.h
@@ -34,13 +34,7 @@ enum { HPI_DEBUG_LEVEL_ERROR = 0, /* always log errors */
#define FILE_LINE __FILE__ ":" __stringify(__LINE__) " "
#endif

-#define HPI_DEBUG_ASSERT(expression) \
- do { \
- if (!(expression)) { \
- printk(KERN_ERR FILE_LINE \
- "ASSERT " __stringify(expression)); \
- } \
- } while (0)
+#define HPI_DEBUG_ASSERT(expression) ASSERT_WARN(expression)

#define HPI_DEBUG_LOG(level, ...) \
do { \
--
1.8.3.1
\
 
 \ /
  Last update: 2020-08-27 12:15    [W:0.168 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site