[PATCH 5/8] octeontx2-pf: Use ALIGN() on a DMA address

From: Jack Wallner

Date: Sun Nov 29 2026 - 03:56:54 EST


PTR_ALIGN() is meant for pointers. cn10k_outb_cptlf_iq_alloc() passes it
a dma_addr_t. That compiles because PTR_ALIGN() casts its argument to
unsigned long and back.

A later patch in this series makes PTR_ALIGN() do pointer arithmetic on
its argument so that the compiler can keep track of the object size,
and documents that the argument has to be a pointer. Use ALIGN() for
this address, which works in the type of its argument.

No functional change: the driver depends on 64BIT, where both macros
give the same value.

Compile tested only.

The change and this changelog were written by an AI coding assistant
(Claude, run in Claude Code) at my direction. See the cover letter for
how it was used and tested.

Signed-off-by: Jack Wallner <jackwallner@xxxxxxxxx>
---
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c
index 443435608..7ba0f4a28 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c
@@ -248,7 +248,7 @@ static int cn10k_outb_cptlf_iq_alloc(struct otx2_nic *pf)

/* Align pointers */
iq->vaddr = PTR_ALIGN(iq->vaddr, OTX2_ALIGN);
- iq->dma_addr = PTR_ALIGN(iq->dma_addr, OTX2_ALIGN);
+ iq->dma_addr = ALIGN(iq->dma_addr, OTX2_ALIGN);
return 0;
}

--
2.43.0