Skip to content

Commit

Permalink
locking/atomic: simplify ifdef generation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Mark Rutland authored and Peter Zijlstra committed Jul 16, 2021
1 parent d4e5076 commit 47401d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/atomic/gen-atomic-fallback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ gen_proto_order_variants()
gen_basic_fallbacks "${basename}"

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

0 comments on commit 47401d9

Please sign in to comment.