[PATCH 1/5] arm64: atomics: format whitespace consistently

Will Deacon will at kernel.org
Mon Dec 13 11:20:17 PST 2021


On Fri, Dec 10, 2021 at 03:14:06PM +0000, Mark Rutland wrote:
> The code for the atomic ops is formatted inconsistently, and while this
> is not a functional problem it is rather distracting when working on
> them.
> 
> Some have ops have consistent indentation, e.g.
> 
> | #define ATOMIC_OP_ADD_RETURN(name, mb, cl...)                           \
> | static inline int __lse_atomic_add_return##name(int i, atomic_t *v)     \
> | {                                                                       \
> |         u32 tmp;                                                        \
> |                                                                         \
> |         asm volatile(                                                   \
> |         __LSE_PREAMBLE                                                  \
> |         "       ldadd" #mb "    %w[i], %w[tmp], %[v]\n"                 \
> |         "       add     %w[i], %w[i], %w[tmp]"                          \
> |         : [i] "+r" (i), [v] "+Q" (v->counter), [tmp] "=&r" (tmp)        \
> |         : "r" (v)                                                       \
> |         : cl);                                                          \
> |                                                                         \
> |         return i;                                                       \
> | }
> 
> While others have negative indentation for some lines, and/or have
> misaligned trailing backslashes, e.g.
> 
> | static inline void __lse_atomic_##op(int i, atomic_t *v)                        \
> | {                                                                       \
> |         asm volatile(                                                   \
> |         __LSE_PREAMBLE                                                  \
> | "       " #asm_op "     %w[i], %[v]\n"                                  \
> |         : [i] "+r" (i), [v] "+Q" (v->counter)                           \
> |         : "r" (v));                                                     \
> | }
> 
> This patch makes the indentation consistent and also aligns the trailing
> backslashes. This makes the code easier to read for those (like myself)
> who are easily distracted by these inconsistencies.
> 
> This is intended as a cleanup.
> There should be no functional change as a result of this patch.

Looks the same to me:

Acked-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list