Skip to contentSkip to conversation

infiniband: nes: add unlikely() to assert()

PATCH In review Igor Stoppa 3 participants 6 messages Aug 31, 2018 – Sep 7, 2018 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 infiniband: nes: add unlikely() to assert()

Typically the assert is expected to not fail.

---
 drivers/infiniband/hw/nes/nes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/nes/nes.h +1 -1
index bedaa02749fb..d2d0098f38e0 100644
@@ -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__); \
 	} \
Signature · 1 line
2.17.1
#3 lore raw
In reply to Leon Romanovsky
Quoted 11 lines · Leon Romanovsky
Quoted 1 line · Igor Stoppa

Typically the assert is expected to not fail.

This whole assert can be removed.

Quoted 3 lines

Most probably that I missed discussion, but anyway, does this "Acked-by" come from internal or external discussion?

This patch was part of a larger series on lkml. In that context, I acked it so that the series could be applied by whomever took it (it didn't belong on rdma-list as a series since only one patch out of some large number touched rdma files). Now it is being resent as not part of a series, but my ack was preserved.

Signature · 3 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
#4 lore raw
Quoted 5 lines · Doug Ledford

This patch was part of a larger series on lkml. In that context, I acked it so that the series could be applied by whomever took it (it didn't belong on rdma-list as a series since only one patch out of some large number touched rdma files). Now it is being resent as not part of a series, but my ack was preserved.

Yes, apologies for the confusion (and maybe wrong process?).
The patchset as a whole didn't seem to gain traction, so I decided to fallback to the more tedious process of submitting them individually.

Since the specific patch was not altered, I assumed the ack was still valid - I am sorry if I did it wrongly

--
igor

#5 lore raw
Quoted 8 lines · Igor Stoppa
Quoted 5 lines · Doug Ledford

This patch was part of a larger series on lkml. In that context, I acked it so that the series could be applied by whomever took it (it didn't belong on rdma-list as a series since only one patch out of some large number touched rdma files). Now it is being resent as not part of a series, but my ack was preserved.

Quoted 6 lines

Yes, apologies for the confusion (and maybe wrong process?). The patchset as a whole didn't seem to gain traction, so I decided to fallback to the more tedious process of submitting them individually.

Since the specific patch was not altered, I assumed the ack was still valid - I am sorry if I did it wrongly

You didn't do anything wrong, I was curious because my gmail already filtered some linux-rdma mails to wrong folder and I wasn't sure if it is the case again.

Thanks

Quoted 3 lines

--
igor