From: Igor Stoppa <igor.stoppa@gmail.com>
To: Faisal Latif <faisal.latif@intel.com>
Cc: igor.stoppa@gmail.com, Igor Stoppa <igor.stoppa@huawei.com>,
Chien Tung <chien.tin.tung@intel.com>,
Roland Dreier <rolandd@cisco.com>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] infiniband: nes: add unlikely() to assert()
Date: Fri, 31 Aug 2018 22:24:18 +0300 [thread overview]
Message-ID: <20180831192418.12346-1-igor.stoppa@huawei.com> (raw)
Typically the assert is expected to not fail.
Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Acked-by: Doug Ledford <dledford@redhat.com>
Cc: Faisal Latif <faisal.latif@intel.com>
Cc: Chien Tung <chien.tin.tung@intel.com>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Faisal Latif <faisal.latif@intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-rdma@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/infiniband/hw/nes/nes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index bedaa02749fb..d2d0098f38e0 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -151,7 +151,7 @@ do { \
#define assert(expr) \
do { \
- if (!(expr)) { \
+ if (unlikely(!(expr))) { \
printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \
#expr, __FILE__, __func__, __LINE__); \
} \
--
2.17.1
next reply other threads:[~2018-08-31 19:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 19:24 Igor Stoppa [this message]
2018-09-05 6:01 ` [PATCH] infiniband: nes: add unlikely() to assert() Leon Romanovsky
2018-09-05 18:54 ` Igor Stoppa
2018-09-07 15:13 ` Doug Ledford
2018-09-07 15:25 ` Igor Stoppa
2018-09-07 17:31 ` Leon Romanovsky
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=20180831192418.12346-1-igor.stoppa@huawei.com \
--to=igor.stoppa@gmail.com \
--cc=chien.tin.tung@intel.com \
--cc=faisal.latif@intel.com \
--cc=igor.stoppa@huawei.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=rolandd@cisco.com \
/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