summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-06-30 10:03:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-06-30 10:03:22 -0700
commit1a0e93df1e107dc766fdf86ae88076efd9f376e6 (patch)
tree509fe2df07ba12b4dc71a176a34a734ff75d69c8 /include
parent9fb3bb25d15326464e2183a5eb4b1ea8725d560c (diff)
parent0fe3dbbefb74a8575f61d7801b08dbc50523d60d (diff)
downloadlinux-1a0e93df1e107dc766fdf86ae88076efd9f376e6.tar.bz2
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fixes from Jason Gunthorpe: "Three minor bug fixes: - qedr not setting the QP timeout properly toward userspace - Memory leak on error path in ib_cm - Divide by 0 in RDMA interrupt moderation" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: linux/dim: Fix divide by 0 in RDMA DIM RDMA/cm: Fix memory leak in ib_cm_insert_listen RDMA/qedr: Fix reporting QP timeout attribute
Diffstat (limited to 'include')
-rw-r--r--include/linux/dim.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dim.h b/include/linux/dim.h
index b698266d0035..6c5733981563 100644
--- a/include/linux/dim.h
+++ b/include/linux/dim.h
@@ -21,7 +21,7 @@
* We consider 10% difference as significant.
*/
#define IS_SIGNIFICANT_DIFF(val, ref) \
- (((100UL * abs((val) - (ref))) / (ref)) > 10)
+ ((ref) && (((100UL * abs((val) - (ref))) / (ref)) > 10))
/*
* Calculate the gap between two values.