Re: [PATCH 2/8] crypto: nitrox, octeontx, octeontx2 - Use ALIGN() on DMA addresses

From: Herbert Xu

Date: Fri Dec 04 2026 - 00:50:49 EST


Jack Wallner <jackwallner@xxxxxxxxx> wrote:
> PTR_ALIGN() is meant for pointers. nitrox_cmdq_init(),
> copy_ucode_to_dma_mem() and otx2_cpt_alloc_instruction_queues() pass 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
> these addresses, which works in the type of its argument.
>
> No functional change: all three drivers depend 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/crypto/cavium/nitrox/nitrox_lib.c | 2 +-
> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 2 +-
> drivers/crypto/marvell/octeontx2/otx2_cptlf.h | 3 +--
> 3 files changed, 3 insertions(+), 4 deletions(-)

Acked-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt