Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

locking/atomic: simplify ifdef generation

In gen-atomic-fallback.sh's gen_proto_order_variants(), we generate some
ifdeferry with:

| local basename="${arch}${atomic}_${pfx}${name}${sfx}"
| ...
| printf "#ifdef ${basename}\n"
| ...
| printf "#endif /* ${arch}${atomic}_${pfx}${name}${sfx} */\n\n"

For clarity, use ${basename} for both sides, rather than open-coding the
string generation.

There is no change to any of the generated headers as a result of this
patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210713105253.7615-2-mark.rutland@arm.com

authored by

Mark Rutland and committed by
Peter Zijlstra
47401d94 d4e5076c

+1 -1
+1 -1
scripts/atomic/gen-atomic-fallback.sh
··· 128 128 gen_basic_fallbacks "${basename}" 129 129 130 130 if [ ! -z "${template}" ]; then 131 - printf "#endif /* ${arch}${atomic}_${pfx}${name}${sfx} */\n\n" 131 + printf "#endif /* ${basename} */\n\n" 132 132 gen_proto_fallback "${meta}" "${pfx}" "${name}" "${sfx}" "" "$@" 133 133 gen_proto_fallback "${meta}" "${pfx}" "${name}" "${sfx}" "_acquire" "$@" 134 134 gen_proto_fallback "${meta}" "${pfx}" "${name}" "${sfx}" "_release" "$@"