linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chunguang Xu <brookxu.cn@gmail.com>
To: arnd@arndb.de
Cc: rppt@kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 15/23] media/staging: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code
Date: Thu, 27 Aug 2020 18:14:20 +0800	[thread overview]
Message-ID: <9c473950331710b8ca837dbdaf14c12e62fabac2.1598518912.git.brookxu@tencent.com> (raw)
In-Reply-To: <cover.1598518912.git.brookxu@tencent.com>
In-Reply-To: <cover.1598518912.git.brookxu@tencent.com>

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>
---
 .../staging/media/atomisp/pci/hive_isp_css_include/assert_support.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/assert_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/assert_support.h
index 7382c0b..c7e65e3 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/assert_support.h
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/assert_support.h
@@ -51,11 +51,7 @@
  * but that causes many compiler warnings (==errors) under Android
  * because it seems that the BUG_ON() macro is not seen as a check by
  * gcc like the BUG() macro is. */
-#define assert(cnd) \
-	do { \
-		if (!(cnd)) \
-			BUG(); \
-	} while (0)
+#define assert(cnd) ASSERT_FAIL(cnd)
 
 #ifndef PIPE_GENERATION
 /* Deprecated OP___assert, this is still used in ~1000 places
-- 
1.8.3.1


  parent reply	other threads:[~2020-08-27 10:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 10:14 [PATCH 00/23] clean up the code related to ASSERT() Chunguang Xu
2020-08-27 10:14 ` [PATCH 01/23] include/asm-generic/bug.h: add ASSERT_FAIL() and ASSERT_WARN() wrapper Chunguang Xu
2020-08-27 10:14 ` [PATCH 02/23] ia64: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code Chunguang Xu
2020-08-27 10:14 ` [PATCH 03/23] KVM: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 04/23] fore200e: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 05/23] scsi: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 06/23] rxrpc: " Chunguang Xu
2020-08-27 17:10   ` kernel test robot
2020-08-27 18:03   ` kernel test robot
2020-08-28  6:05   ` kernel test robot
2020-08-27 10:14 ` [PATCH 07/23] lib/mpi: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 08/23] jfs: " Chunguang Xu
2020-08-27 16:13   ` kernel test robot
2020-08-27 10:14 ` [PATCH 09/23] cachefiles: " Chunguang Xu
2020-08-28  4:30   ` kernel test robot
2020-08-27 10:14 ` [PATCH 10/23] btrfs: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 11/23] afs: " Chunguang Xu
2020-08-27 16:29   ` kernel test robot
2020-08-28  9:49   ` kernel test robot
2020-08-27 10:14 ` [PATCH 12/23] rivafb: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 13/23] nvidia: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 14/23] fbdev/cirrusfb:: " Chunguang Xu
2020-08-27 10:14 ` Chunguang Xu [this message]
2020-08-27 10:14 ` [PATCH 16/23] sym53c8xx: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 17/23] 8139too: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 18/23] net:hns: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 19/23] block/sx8: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 20/23] skb: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 21/23] ext4: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 22/23] rbd: " Chunguang Xu
2020-08-27 10:14 ` [PATCH 23/23] ALSA: asihpi: " Chunguang Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c473950331710b8ca837dbdaf14c12e62fabac2.1598518912.git.brookxu@tencent.com \
    --to=brookxu.cn@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).