Re: [RFC PATCH v1] devres: align devres.data strictly only for devm_kmalloc()

From: Marc Gonzalez
Date: Tue Dec 17 2019 - 11:18:00 EST


On 17/12/2019 16:30, Marc Gonzalez wrote:

> +#define DEVM_KMALLOC_PADDING_SIZE \
> + (ARCH_KMALLOC_MINALIGN - sizeof(struct devres) % ARCH_KMALLOC_MINALIGN)

Doh!

#define DEVM_KMALLOC_PADDING_SIZE \
((ARCH_KMALLOC_MINALIGN - sizeof(struct devres)) % ARCH_KMALLOC_MINALIGN)