[PATCH v2 08/14] net/hinic: use common division round up macro
Joshua Washington
joshwash at google.com
Thu Aug 13 19:22:33 CEST 2026
The RTE_DIV_ROUND_UP in rte_common.h makes DIV_ROUND_UP redundant.
Signed-off-by: Joshua Washington <joshwash at google.com>
---
drivers/net/hinic/base/hinic_compat.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index 707a3b92b9..f4398a7847 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -70,11 +70,8 @@ typedef uint64_t dma_addr_t;
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
#define lower_32_bits(n) ((u32)(n))
-/* Returns X / Y, rounding up. X must be nonnegative to round correctly. */
-#define DIV_ROUND_UP(X, Y) (((X) + ((Y) - 1)) / (Y))
-
/* Returns X rounded up to the nearest multiple of Y. */
-#define ROUND_UP(X, Y) (DIV_ROUND_UP(X, Y) * (Y))
+#define ROUND_UP(X, Y) (RTE_DIV_ROUND_UP(X, Y) * (Y))
#undef ALIGN
#define ALIGN(x, a) RTE_ALIGN(x, a)
--
2.55.0.691.gc56d675ccc-goog
More information about the dev
mailing list