Skip to contentSkip to conversation

headers_install.sh: Support __aligned(x) for uAPI headers

PATCH Superseded Sakari Ailus 1 participant 1 message Nov 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 headers_install.sh: Support __aligned(x) for uAPI headers

The headers-install.sh already supports __packed conversion to __attribute__((packed)) for uAPI headers but it does not support similar __aligned(x) conversion.

Add support for __aligned(x).

---
 scripts/headers_install.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/headers_install.sh +1 -0
index 593f8879c6410..9ed490f33a3ac 100755
@@ -36,6 +36,7 @@ do
 		-e 's/__attribute_const__([[:space:]]|$)/\1/g' \
 		-e 's@^#include <linux/compiler(|_types).h>@@' \
 		-e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \
+		-e 's/(^|[^a-zA-Z0-9])__aligned(\([0-9 ]*\))([^a-zA-Z0-9_]|$)/\1__attribute__((aligned\2))\3/g' \
 		-e 's/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g' \
 		-e 's@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' \
 		"$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1
Signature · 1 line
2.11.0