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: scripts: split pfx/name/sfx/order

Currently gen-atomic-long.sh's gen_proto_order_variant() function
combines the pfx/name/sfx/order variables immediately, unlike other
functions in gen-atomic-*.sh.

This is fine today, but subsequent patches will require the individual
individual pfx/name/sfx/order variables within gen-atomic-long.sh's
gen_proto_order_variant() function. In preparation for this, split the
variables in the style of other gen-atomic-*.sh scripts.

This results in no change to the generated headers, so there should be
no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230605070124.3741859-22-mark.rutland@arm.com

authored by

Mark Rutland and committed by
Peter Zijlstra
b916a8c7 9257959a

+8 -3
+8 -3
scripts/atomic/gen-atomic-long.sh
··· 36 36 gen_proto_order_variant() 37 37 { 38 38 local meta="$1"; shift 39 - local name="$1$2$3$4"; shift; shift; shift; shift 39 + local pfx="$1"; shift 40 + local name="$1"; shift 41 + local sfx="$1"; shift 42 + local order="$1"; shift 40 43 local atomic="$1"; shift 41 44 local int="$1"; shift 45 + 46 + local atomicname="${pfx}${name}${sfx}${order}" 42 47 43 48 local ret="$(gen_ret_type "${meta}" "long")" 44 49 local params="$(gen_params "long" "atomic_long" "$@")" ··· 52 47 53 48 cat <<EOF 54 49 static __always_inline ${ret} 55 - raw_atomic_long_${name}(${params}) 50 + raw_atomic_long_${atomicname}(${params}) 56 51 { 57 - ${retstmt}raw_${atomic}_${name}(${argscast}); 52 + ${retstmt}raw_${atomic}_${atomicname}(${argscast}); 58 53 } 59 54 60 55 EOF