Skip to content

Commit 47401d9

Browse files
mrutland-armPeter Zijlstra
authored andcommitted
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
1 parent d4e5076 commit 47401d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/atomic/gen-atomic-fallback.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ gen_proto_order_variants()
128128
gen_basic_fallbacks "${basename}"
129129

130130
if [ ! -z "${template}" ]; then
131-
printf "#endif /* ${arch}${atomic}_${pfx}${name}${sfx} */\n\n"
131+
printf "#endif /* ${basename} */\n\n"
132132
gen_proto_fallback "${meta}" "${pfx}" "${name}" "${sfx}" "" "$@"
133133
gen_proto_fallback "${meta}" "${pfx}" "${name}" "${sfx}" "_acquire" "$@"
134134
gen_proto_fallback "${meta}" "${pfx}" "${name}" "${sfx}" "_release" "$@"

0 commit comments

Comments
 (0)