devres: Align data[] to ARCH_KMALLOC_MINALIGN

Initially we bumped into problem with 32-bit aligned atomic64_t
on ARC, see [1]. And then during quite lengthly discussion Peter Z.
mentioned ARCH_KMALLOC_MINALIGN which IMHO makes perfect sense.
If allocation is done by plain kmalloc() obtained buffer will be
ARCH_KMALLOC_MINALIGN aligned and then why buffer obtained via
devm_kmalloc() should have any other alignment?

This way we at least get the same behavior for both types of


Signed-off-by: Alexey Brodkin <>
Cc: Greg Kroah-Hartman <>
Cc: Geert Uytterhoeven <>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Cc: Vineet Gupta <>
Cc: Will Deacon <>
Cc: Greg KH <>
Cc: <> # 4.8+
Signed-off-by: Greg Kroah-Hartman <>
1 file changed