Messages in this thread Patch in this message | | | From | Chunguang Xu <> | Subject | [PATCH 23/23] ALSA: asihpi: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code | Date | Thu, 27 Aug 2020 18:14:28 +0800 |
| |
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
| |