Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH 1/9] stringify: add HEX_STRING()
@ 2011-07-10 19:51 Randy Dunlap
  2011-07-13 21:05 ` Mauro Carvalho Chehab
  2011-07-13 21:49 ` Arnaud Lacombe
  0 siblings, 2 replies; 18+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:51 UTC (permalink / raw)
  To: lkml; +Cc: linux-kbuild, linux-media, mchehab

From: Randy Dunlap <rdunlap@xenotime.net>

Add HEX_STRING(value) to stringify.h so that drivers can
convert kconfig hex values (without leading "0x") to useful
hex constants.

Several drivers/media/radio/ drivers need this.  I haven't
checked if any other drivers need to do this.

Alternatively, kconfig could produce hex config symbols with
leading "0x".

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 include/linux/stringify.h |    7 +++++++
 1 file changed, 7 insertions(+)

NOTE: The other 8 patches are on lkml and linux-media mailing lists.

--- linux-next-20110707.orig/include/linux/stringify.h
+++ linux-next-20110707/include/linux/stringify.h
@@ -9,4 +9,11 @@
 #define __stringify_1(x...)	#x
 #define __stringify(x...)	__stringify_1(x)
 
+/*
+ * HEX_STRING(value) is useful for CONFIG_ values that are in hex,
+ * but kconfig does not put a leading "0x" on them.
+ */
+#define HEXSTRINGVALUE(h, value)	h##value
+#define HEX_STRING(value)		HEXSTRINGVALUE(0x, value)
+
 #endif	/* !__LINUX_STRINGIFY_H */

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

end of thread, other threads:[~2011-07-24 21:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
2011-07-13 21:05 ` Mauro Carvalho Chehab
2011-07-13 21:11   ` Randy Dunlap
2011-07-13 22:04   ` Randy Dunlap
2011-07-13 21:49 ` Arnaud Lacombe
2011-07-13 22:00   ` Randy Dunlap
2011-07-13 22:06     ` Arnaud Lacombe
2011-07-13 22:08       ` Randy Dunlap
2011-07-13 22:13         ` Arnaud Lacombe
2011-07-13 22:17           ` Randy Dunlap
2011-07-14  4:03             ` Arnaud Lacombe
2011-07-14 17:26             ` [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols Arnaud Lacombe
2011-07-14 18:16               ` Mauro Carvalho Chehab
2011-07-14 18:47                 ` Arnaud Lacombe
2011-07-14 23:32                 ` Arnaud Lacombe
2011-07-15  0:01                   ` Mauro Carvalho Chehab
2011-07-15  1:39                     ` Arnaud Lacombe
2011-07-24 21:38               ` Arnaud Lacombe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox