summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2016-12-12 16:40:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 18:55:06 -0800
commit779d5eb375f8f3aa9b83d24cc8e3e56fe5dc9864 (patch)
tree521adbd3098e4af7ef10065134ca263808a24e70 /scripts
parent0d7bbb43641c35390378e951785f2351bc36650a (diff)
scripts/tags.sh: handle OMAP platforms properly
When SUBARCH is "omap1" or "omap2", plat-omap/ directory must be indexed. Handle this special case properly. While at it, check if mach- directory exists at all. Link: http://lkml.kernel.org/r/20161202122148.15001-1-joe.skb7@gmail.com Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Cc: Michal Marek <mmarek@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tags.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh
index a2ff3388e5ea..df5fa777d300 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -304,11 +304,26 @@ if [ "${ARCH}" = "um" ]; then
elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
-name "plat-*" -type d);
+ mach_suffix=$SUBARCH
+ plat_suffix=$SUBARCH
+
+ # Special cases when $plat_suffix != $mach_suffix
+ case $mach_suffix in
+ "omap1" | "omap2")
+ plat_suffix="omap"
+ ;;
+ esac
+
+ if [ ! -d ${tree}arch/$SRCARCH/mach-$mach_suffix ]; then
+ echo "Warning: arch/arm/mach-$mach_suffix/ not found." >&2
+ echo " Fix your \$SUBARCH appropriately" >&2
+ fi
+
for i in $subarchdir; do
case "$i" in
- *"mach-"${SUBARCH})
+ *"mach-"${mach_suffix})
;;
- *"plat-"${SUBARCH})
+ *"plat-"${plat_suffix})
;;
*)
subarchprune="$subarchprune \