[PATCH] infiniband: nes: add unlikely() to assert()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Typically the assert is expected to not fail.

Signed-off-by: Igor Stoppa <igor.stoppa@xxxxxxxxxx>
Acked-by: Doug Ledford <dledford@xxxxxxxxxx>
Cc: Faisal Latif <faisal.latif@xxxxxxxxx>
Cc: Chien Tung <chien.tin.tung@xxxxxxxxx>
Cc: Roland Dreier <rolandd@xxxxxxxxx>
Cc: Faisal Latif <faisal.latif@xxxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: linux-rdma@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
---
 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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux