Skip to content

Commit 779d5eb

Browse files
Sam Protsenkotorvalds
authored andcommitted
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>
1 parent 0d7bbb4 commit 779d5eb

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

scripts/tags.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,26 @@ if [ "${ARCH}" = "um" ]; then
304304
elif [ "${SRCARCH}" = "arm" -a "${SUBARCH}" != "" ]; then
305305
subarchdir=$(find ${tree}arch/$SRCARCH/ -name "mach-*" -type d -o \
306306
-name "plat-*" -type d);
307+
mach_suffix=$SUBARCH
308+
plat_suffix=$SUBARCH
309+
310+
# Special cases when $plat_suffix != $mach_suffix
311+
case $mach_suffix in
312+
"omap1" | "omap2")
313+
plat_suffix="omap"
314+
;;
315+
esac
316+
317+
if [ ! -d ${tree}arch/$SRCARCH/mach-$mach_suffix ]; then
318+
echo "Warning: arch/arm/mach-$mach_suffix/ not found." >&2
319+
echo " Fix your \$SUBARCH appropriately" >&2
320+
fi
321+
307322
for i in $subarchdir; do
308323
case "$i" in
309-
*"mach-"${SUBARCH})
324+
*"mach-"${mach_suffix})
310325
;;
311-
*"plat-"${SUBARCH})
326+
*"plat-"${plat_suffix})
312327
;;
313328
*)
314329
subarchprune="$subarchprune \

0 commit comments

Comments
 (0)