Skip to contentSkip to conversation

cec-ctl: Prepare for __inline__ instead of inline

PATCH New Sakari Ailus 1 participant 1 message Apr 4, 2018 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cec-ctl: Prepare for __inline__ instead of inline

Once formatted for user space consumption, inlined functions in include/uapi/linux/cec-funcs.h have "__inline__" modifier instead of "inline" at least in some circumstances. msg2ctl.pl gets confused of __inline__, allow both to avoid trouble.

---
 utils/cec-ctl/msg2ctl.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
utils/cec-ctl/msg2ctl.pl +4 -4
index 0e494c5..d95e8af 100755
@@ -383,14 +383,14 @@ while (<>) {
 	next if /^\s*$/;
 	next if /cec_msg_reply_feature_abort/;
 	next if /cec_msg_htng_init/;
-	if (/^static inline void cec_msg.*\(.*\)/) {
-		s/static\sinline\svoid\s//;
+	if (/^static (__)?inline(__)? void cec_msg.*\(.*\)/) {
+		s/static\s(__)?inline(__)?\svoid\s//;
 		s/struct cec_msg \*msg, //;
 		s/struct cec_msg \*msg//;
 		process_func($feature, $_);
 		next;
 	}
-	if (/^static inline void cec_msg/) {
+	if (/^static (__)?inline(__)? void cec_msg/) {
 		$func = $_;
 		next;
 	}
@@ -398,7 +398,7 @@ while (<>) {
 		$func .= $_;
 		next unless /\)$/;
 		$func =~ s/\s+/ /g;
-		$func =~ s/static\sinline\svoid\s//;
+		$func =~ s/static\s(__)?inline(__)?\svoid\s//;
 		$func =~ s/struct cec_msg \*msg, //;
 		$func =~ s/struct cec_msg \*msg//;
 		process_func($feature, $func);
Signature · 1 line
2.7.4