All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] compat-drivers: Handle int's when generating compat_autoconf.h
@ 2012-10-28 17:04 Ozan Çağlayan
  2012-10-28 17:04 ` [PATCH 2/7] compat-drivers: Rename CONFIG_* vars in nouveau driver Ozan Çağlayan
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ozan Çağlayan @ 2012-10-28 17:04 UTC (permalink / raw)
  To: backports; +Cc: mcgrof, Ozan Çağlayan

Some Kconfig variables take integer values instead of y/m/N like
CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT. Currently all
values other than y/m/N were escaped with double-quotes to define
them as strings. Fix this to allow integer values for Kconfig
variables.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
---
 scripts/gen-compat-autoconf.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index f9fed36..c9ab9da 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -57,13 +57,19 @@ function define_config {
 		echo "#define $VAR 1"
 		echo "#endif /* $VAR */ "
 		;;
-	*) # Assume string
-		# XXX: add better checks to make sure what was on
-		# the right was indeed a string
+	[0-9]*)
+		# Leave integers as is
+		echo "#ifndef $VAR"
+		echo "#define $VAR $VALUE"
+		echo "#endif /* $VAR */ "
+		;;
+	*)
+		# Escape every other thing with double quotes
 		echo "#ifndef $VAR"
 		echo "#define $VAR \"$VALUE\""
 		echo "#endif /* $VAR */ "
 		;;
+
 	esac
 }
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-28 17:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-28 17:04 [PATCH 1/7] compat-drivers: Handle int's when generating compat_autoconf.h Ozan Çağlayan
2012-10-28 17:04 ` [PATCH 2/7] compat-drivers: Rename CONFIG_* vars in nouveau driver Ozan Çağlayan
2012-10-28 17:04 ` [PATCH 3/7] compat-drivers: Add missing config check Ozan Çağlayan
2012-10-28 17:04 ` [PATCH 4/7] compat-drivers: Rename CONFIG_DRM_NOUVEAU_BACKLIGHT Ozan Çağlayan
2012-10-28 17:04 ` [PATCH 5/7] compat-drivers: Fix comments Ozan Çağlayan
2012-10-28 17:04 ` [PATCH 6/7] compat-drivers: Enable nouveau DRM driver for kernels >= 3.3 Ozan Çağlayan
2012-10-28 17:04 ` [PATCH 7/7] compat-drivers: Update README Ozan Çağlayan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.