[patch] make hdrscheck.sh force __asm__ in exported headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This updates scripts/hdrschecks.sh by grepping for asm() constructs and
rejecting them in favor of __asm__() in exported headers.

Signed-off-by: Mike Frysinger <[email protected]>
---
diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh
index 3159858..33d17cc 100755
--- a/scripts/hdrcheck.sh
+++ b/scripts/hdrcheck.sh
@@ -6,5 +6,16 @@ for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\
 	exit 1
     fi
 done
+
+# make sure we export __asm__(), not asm()
+lines=$(grep -n -E \
+	-e '\<asm[[:space:]]*(_{1,2}?volatile_{1,2}?[[:space:]]*)?\(' \
+	$2)
+if [ -n "$lines" ] ; then
+	echo "$2 should convert asm() usage to __asm__() in exported headers"
+	echo "$lines"
+	exit 1
+fi
+
 # FIXME: List dependencies into $3
 touch $3
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux