Skip to content

Commit 0751740

Browse files
ajitkhapardetmonjalo
authored andcommitted
net/bnxt: fix build with some compilers
The driver was defining its own version of roundup which was conflicting with another version defined elsewhere. Change the local definition of roundup to avoid compilation errors. Fixes: f8168ca ("net/bnxt: support thor controller") Signed-off-by: Ajit Khaparde <[email protected]>
1 parent e28111a commit 0751740

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/bnxt/bnxt_ethdev.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -3545,7 +3545,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
35453545
bp->ctx = NULL;
35463546
}
35473547

3548-
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
3548+
#define bnxt_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
35493549

35503550
#define min_t(type, x, y) ({ \
35513551
type __min1 = (x); \
@@ -3612,7 +3612,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
36123612
return rc;
36133613

36143614
entries = ctx->qp_max_l2_entries;
3615-
entries = roundup(entries, ctx->tqm_entries_multiple);
3615+
entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
36163616
entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
36173617
ctx->tqm_max_entries_per_ring);
36183618
for (i = 0, ena = 0; i < BNXT_MAX_Q; i++) {

0 commit comments

Comments
 (0)