Skip to contentSkip to conversation

stringify: add HEX_STRING()

PATCH In review Randy Dunlap 3 participants 27 messages Jul 10, 2011 – Jul 24, 2011

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 stringify: add HEX_STRING()

From: Randy Dunlap <[email protected]>

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".

---
 include/linux/stringify.h |    7 +++++++
 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +7 -0
@@ -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 */
#1 lore raw

PATCH 2/9 media/radio: fix aimslab CONFIG IO PORT

From: Randy Dunlap <[email protected]>

Modify radio-aimslab to use HEX_STRING(CONFIG_RADIO_RTRACK_PORT) so that the correct IO port value is used.

Fixes this error message when CONFIG_RADIO_RTRACK_PORT=20f:
drivers/media/radio/radio-aimslab.c:49:17: error: invalid suffix "f" on integer constant

---
 drivers/media/radio/radio-aimslab.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-aimslab.c +5 -2
@@ -32,6 +32,7 @@
 #include <linux/init.h>		/* Initdata			*/
 #include <linux/ioport.h>	/* request_region		*/
 #include <linux/delay.h>	/* msleep			*/
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs		*/
 #include <linux/io.h>		/* outb, outb_p			*/
 #include <media/v4l2-device.h>
@@ -43,10 +44,12 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION("0.0.3");
 
 #ifndef CONFIG_RADIO_RTRACK_PORT
-#define CONFIG_RADIO_RTRACK_PORT -1
+#define __RADIO_RTRACK_PORT -1
+#else
+#define __RADIO_RTRACK_PORT HEX_STRING(CONFIG_RADIO_RTRACK_PORT)
 #endif
 
-static int io = CONFIG_RADIO_RTRACK_PORT;
+static int io = __RADIO_RTRACK_PORT;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
#2 lore raw

Re: [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT

Hi,

2 to 7 will be not needed. I screwed up a autoconf.h generation while refactoring the code. This is being addressed in the kbuild tree by:

https://patchwork.kernel.org/patch/975652/

My bad,
- Arnaud

Quoted 44 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-aimslab to use HEX_STRING(CONFIG_RADIO_RTRACK_PORT) so that the correct IO port value is used.

Fixes this error message when CONFIG_RADIO_RTRACK_PORT=20f:
drivers/media/radio/radio-aimslab.c:49:17: error: invalid suffix "f" on integer constant

---
 drivers/media/radio/radio-aimslab.c |    7 +++++--

 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-aimslab.c +5 -3
@@ -32,6 +32,7 @@
  #include <linux/init.h>                /* Initdata                     */
  #include <linux/ioport.h>      /* request_region               */
  #include <linux/delay.h>       /* msleep                       */
+#include <linux/stringify.h>
  #include <linux/videodev2.h>   /* kernel radio structs         */
  #include <linux/io.h>          /* outb, outb_p                 */
  #include <media/v4l2-device.h>
@@ -43,10 +44,12 @@ MODULE_LICENSE("GPL");
  MODULE_VERSION("0.0.3");
 
  #ifndef CONFIG_RADIO_RTRACK_PORT
-#define CONFIG_RADIO_RTRACK_PORT -1
+#define __RADIO_RTRACK_PORT -1
+#else
+#define __RADIO_RTRACK_PORT HEX_STRING(CONFIG_RADIO_RTRACK_PORT)
  #endif
 
-static int io = CONFIG_RADIO_RTRACK_PORT;
+static int io = __RADIO_RTRACK_PORT;
  static int radio_nr = -1;
 
  module_param(io, int, 0);
--

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/

#3 lore raw

PATCH 3/9 media/radio: fix aztech CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-aztech to use HEX_STRING(CONFIG_RADIO_AZTECH_PORT) so that the correct IO port value is used.

Fixes the IO port value that is used since this is hex:
CONFIG_RADIO_AZTECH_PORT=350
but it was being interpreted as decimal instead of hex.

---
 drivers/media/radio/radio-aztech.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-aztech.c +5 -2
@@ -29,6 +29,7 @@
 #include <linux/init.h>		/* Initdata			*/
 #include <linux/ioport.h>	/* request_region		*/
 #include <linux/delay.h>	/* udelay			*/
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs		*/
 #include <linux/io.h>		/* outb, outb_p			*/
 #include <media/v4l2-device.h>
@@ -42,10 +43,12 @@ MODULE_VERSION("0.0.3");
 /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
 
 #ifndef CONFIG_RADIO_AZTECH_PORT
-#define CONFIG_RADIO_AZTECH_PORT -1
+#define __RADIO_AZTECH_PORT -1
+#else
+#define __RADIO_AZTECH_PORT HEX_STRING(CONFIG_RADIO_AZTECH_PORT)
 #endif
 
-static int io = CONFIG_RADIO_AZTECH_PORT;
+static int io = __RADIO_AZTECH_PORT;
 static int radio_nr = -1;
 static int radio_wait_time = 1000;
 
#4 lore raw

PATCH 4/9 media/radio: fix gemtek CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-gemtek to use HEX_STRING(CONFIG_RADIO_GEMTEK_PORT) so that the correct IO port value is used.

Fixes this error message when CONFIG_RADIO_GEMTEK_PORT=34c:
drivers/media/radio/radio-gemtek.c:49:18: error: invalid suffix "c" on integer constant

---
 drivers/media/radio/radio-gemtek.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-gemtek.c +5 -2
@@ -20,6 +20,7 @@
 #include <linux/init.h>		/* Initdata			*/
 #include <linux/ioport.h>	/* request_region		*/
 #include <linux/delay.h>	/* udelay			*/
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs		*/
 #include <linux/mutex.h>
 #include <linux/io.h>		/* outb, outb_p			*/
@@ -40,13 +41,15 @@ MODULE_VERSION("0.0.4");
  */
 
 #ifndef CONFIG_RADIO_GEMTEK_PORT
-#define CONFIG_RADIO_GEMTEK_PORT -1
+#define __RADIO_GEMTEK_PORT -1
+#else
+#define __RADIO_GEMTEK_PORT HEX_STRING(CONFIG_RADIO_GEMTEK_PORT)
 #endif
 #ifndef CONFIG_RADIO_GEMTEK_PROBE
 #define CONFIG_RADIO_GEMTEK_PROBE 1
 #endif
 
-static int io		= CONFIG_RADIO_GEMTEK_PORT;
+static int io		= __RADIO_GEMTEK_PORT;
 static int probe	= CONFIG_RADIO_GEMTEK_PROBE;
 static int hardmute;
 static int shutdown	= 1;
#5 lore raw

PATCH 5/9 media/radio: fix rtrack2 CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-rtrack2 to use HEX_STRING(CONFIG_RADIO_RTRACK2_PORT) so that the correct IO port value is used.

Fixes this error message when CONFIG_RADIO_RTRACK2_PORT=30c:
drivers/media/radio/radio-rtrack2.c:31:17: error: invalid suffix "c" on integer constant

---
 drivers/media/radio/radio-rtrack2.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-rtrack2.c +5 -2
@@ -13,6 +13,7 @@
 #include <linux/init.h>		/* Initdata			*/
 #include <linux/ioport.h>	/* request_region		*/
 #include <linux/delay.h>	/* udelay			*/
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs		*/
 #include <linux/mutex.h>
 #include <linux/io.h>		/* outb, outb_p			*/
@@ -25,10 +26,12 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION("0.0.3");
 
 #ifndef CONFIG_RADIO_RTRACK2_PORT
-#define CONFIG_RADIO_RTRACK2_PORT -1
+#define __RADIO_RTRACK2_PORT -1
+#else
+#define __RADIO_RTRACK2_PORT HEX_STRING(CONFIG_RADIO_RTRACK2_PORT)
 #endif
 
-static int io = CONFIG_RADIO_RTRACK2_PORT;
+static int io = __RADIO_RTRACK2_PORT;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
#6 lore raw

PATCH 6/9 media/radio: fix terratec CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-terratec to use HEX_STRING(CONFIG_RADIO_TERRATEC_PORT) so that the correct IO port value is used.

Fixes the IO port value that is used since this is hex:
CONFIG_RADIO_TERRATEC_PORT=590
but it was being interpreted as decimal instead of hex.

---
 drivers/media/radio/radio-terratec.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-terratec.c +5 -2
@@ -27,6 +27,7 @@
 #include <linux/module.h>	/* Modules 			*/
 #include <linux/init.h>		/* Initdata			*/
 #include <linux/ioport.h>	/* request_region		*/
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs		*/
 #include <linux/mutex.h>
 #include <linux/io.h>		/* outb, outb_p			*/
@@ -39,10 +40,12 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION("0.0.3");
 
 #ifndef CONFIG_RADIO_TERRATEC_PORT
-#define CONFIG_RADIO_TERRATEC_PORT 0x590
+#define __RADIO_TERRATEC_PORT 0x590
+#else
+#define __RADIO_TERRATEC_PORT HEX_STRING(CONFIG_RADIO_TERRATEC_PORT)
 #endif
 
-static int io = CONFIG_RADIO_TERRATEC_PORT;
+static int io = __RADIO_TERRATEC_PORT;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
#7 lore raw

PATCH 7/9 media/radio: fix trust CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-trust to use HEX_STRING(CONFIG_RADIO_TRUST_PORT) so that the correct IO port value is used.

Fixes the IO port value that is used since this is hex:
CONFIG_RADIO_TRUST_PORT=350
but it was being interpreted as decimal instead of hex.

---
 drivers/media/radio/radio-trust.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-trust.c +5 -2
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/stringify.h>
 #include <linux/videodev2.h>
 #include <linux/io.h>
 #include <media/v4l2-device.h>
@@ -32,10 +33,12 @@ MODULE_VERSION("0.0.3");
 /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
 
 #ifndef CONFIG_RADIO_TRUST_PORT
-#define CONFIG_RADIO_TRUST_PORT -1
+#define __RADIO_TRUST_PORT -1
+#else
+#define __RADIO_TRUST_PORT HEX_STRING(CONFIG_RADIO_TRUST_PORT)
 #endif
 
-static int io = CONFIG_RADIO_TRUST_PORT;
+static int io = __RADIO_TRUST_PORT;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
#8 lore raw

PATCH 8/9 media/radio: fix typhoon CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-typhoon to use HEX_STRING(CONFIG_RADIO_TYPHOON_PORT) so that the correct IO port value is used.

Fixes the IO port value that is used since this is hex:
CONFIG_RADIO_TYPHOON_PORT=316
but it was being interpreted as decimal instead of hex.

---
 drivers/media/radio/radio-typhoon.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-typhoon.c +5 -2
@@ -31,6 +31,7 @@
 #include <linux/module.h>	/* Modules                        */
 #include <linux/init.h>		/* Initdata                       */
 #include <linux/ioport.h>	/* request_region		  */
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs           */
 #include <linux/io.h>		/* outb, outb_p                   */
 #include <media/v4l2-device.h>
@@ -44,14 +45,16 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION(DRIVER_VERSION);
 
 #ifndef CONFIG_RADIO_TYPHOON_PORT
-#define CONFIG_RADIO_TYPHOON_PORT -1
+#define __RADIO_TYPHOON_PORT -1
+#else
+#define __RADIO_TYPHOON_PORT HEX_STRING(CONFIG_RADIO_TYPHOON_PORT)
 #endif
 
 #ifndef CONFIG_RADIO_TYPHOON_MUTEFREQ
 #define CONFIG_RADIO_TYPHOON_MUTEFREQ 0
 #endif
 
-static int io = CONFIG_RADIO_TYPHOON_PORT;
+static int io = __RADIO_TYPHOON_PORT;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
#9 lore raw

PATCH 9/9 media/radio: fix zoltrix CONFIG IO PORT

In reply to Randy Dunlap

From: Randy Dunlap <[email protected]>

Modify radio-zoltrix to use HEX_STRING(CONFIG_RADIO_ZOLTRIX_PORT) so that the correct IO port value is used.

Fixes this error message when CONFIG_RADIO_ZOLTRIX_PORT=20c:
drivers/media/radio/radio-zoltrix.c:51:17: error: invalid suffix "c" on integer constant

---
 drivers/media/radio/radio-zoltrix.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/radio/radio-zoltrix.c +5 -2
@@ -33,6 +33,7 @@
 #include <linux/init.h>		/* Initdata                       */
 #include <linux/ioport.h>	/* request_region		  */
 #include <linux/delay.h>	/* udelay, msleep                 */
+#include <linux/stringify.h>
 #include <linux/videodev2.h>	/* kernel radio structs           */
 #include <linux/mutex.h>
 #include <linux/io.h>		/* outb, outb_p                   */
@@ -45,10 +46,12 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION("0.0.3");
 
 #ifndef CONFIG_RADIO_ZOLTRIX_PORT
-#define CONFIG_RADIO_ZOLTRIX_PORT -1
+#define __RADIO_ZOLTRIX_PORT -1
+#else
+#define __RADIO_ZOLTRIX_PORT HEX_STRING(CONFIG_RADIO_ZOLTRIX_PORT)
 #endif
 
-static int io = CONFIG_RADIO_ZOLTRIX_PORT;
+static int io = __RADIO_ZOLTRIX_PORT;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
#10 lore raw
In reply to Randy Dunlap

Em 10-07-2011 16:51, Randy Dunlap escreveu:

Quoted 11 lines

From: Randy Dunlap <[email protected]>

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".

Hi Randy,

After applying patch 1/9 and 2/9 over 3.0-rc7+media patches, I'm now getting this error:

drivers/media/radio/radio-aimslab.c:52:1: error: invalid suffix "x20f" on integer constant

$ grep 20f .config
CONFIG_RADIO_RTRACK_PORT=20f
$ gcc --version
gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)

Before this patch, this were working (or, at least, weren't producing any error).

Perhaps the breakage on your compilation happened due to another patch at the tree? If so, the better would be to apply this patch series together with the ones that caused the breakage, to avoid bisect troubles.

Quoted 22 lines
---
 include/linux/stringify.h |    7 +++++++
 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +7 -0
@@ -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 */
#11 lore raw
Quoted 13 lines · On Wed, 13 Jul 2011 18:05:45 -0300 Mauro Carvalho Chehab wrote:

Em 10-07-2011 16:51, Randy Dunlap escreveu:

Quoted 11 lines

From: Randy Dunlap <[email protected]>

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".

Quoted 6 lines

Hi Randy,

After applying patch 1/9 and 2/9 over 3.0-rc7+media patches, I'm now getting this error:

drivers/media/radio/radio-aimslab.c:52:1: error: invalid suffix "x20f" on integer constant

Hi Mauro,

I built all of these drivers with my patches applied, but I'll see if I can find where this error is coming from.

Thanks for checking & letting me know.

Quoted 28 lines
$ grep 20f .config
CONFIG_RADIO_RTRACK_PORT=20f
$ gcc --version
gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)

Before this patch, this were working (or, at least, weren't producing any error).

Perhaps the breakage on your compilation happened due to another patch at the tree? If so, the better would be to apply this patch series together with the ones that caused the breakage, to avoid bisect troubles.

Quoted 14 lines
---
 include/linux/stringify.h |    7 +++++++
 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
 #define __stringify_1(x...)	#x
 #define __stringify(x...)	__stringify_1(x)
 
Quoted 10 lines

include/linux/stringify.h line 19

Quoted 8 lines
include/linux/stringify.h +7 -0
+/*
+ * 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 */

--

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#12 lore raw
In reply to Mauro Carvalho Chehab
Quoted 23 lines · On Wed, 13 Jul 2011 18:05:45 -0300 Mauro Carvalho Chehab wrote:

Em 10-07-2011 16:51, Randy Dunlap escreveu:

Quoted 11 lines

From: Randy Dunlap <[email protected]>

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".

Hi Randy,

After applying patch 1/9 and 2/9 over 3.0-rc7+media patches, I'm now getting this error:

drivers/media/radio/radio-aimslab.c:52:1: error: invalid suffix "x20f" on integer constant

$ grep 20f .config
CONFIG_RADIO_RTRACK_PORT=20f
Quoted 8 lines
$ gcc --version
gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)

Before this patch, this were working (or, at least, weren't producing any error).

Perhaps the breakage on your compilation happened due to another patch at the tree? If so, the better would be to apply this patch

Do you suspect that?

I built this patch series against the latest linux-next (20110707), so it should contain media patches as of that date.

Quoted 2 lines

series together with the ones that caused the breakage, to avoid bisect troubles.

Sure, if we know what patch it is (if there indeed is one).

Can you do:

$ make drivers/media/radio/radio-aimslab.i

and tell me what this line contains for you?
Mine says:

static int io = 0x20f;

Quoted 14 lines
Quoted 14 lines
---
 include/linux/stringify.h |    7 +++++++
 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
 #define __stringify_1(x...)	#x
 #define __stringify(x...)	__stringify_1(x)
 
Quoted 10 lines

include/linux/stringify.h line 19

Quoted 8 lines
include/linux/stringify.h +7 -0
+/*
+ * 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 */

--

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#13 lore raw
In reply to Randy Dunlap

Hi,

Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

Quoted 6 lines

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".

Actually, I used to have a patch to make hex value have a mandatory "0x" prefix, in the Kconfig. I even fixed all the issue in the tree, it never make it to the tree (not sure why). Here's the relevant thread:

https://patchwork.kernel.org/patch/380591/
https://patchwork.kernel.org/patch/380621/
https://patchwork.kernel.org/patch/380601/

- Arnaud

Quoted 10 lines

---
 include/linux/stringify.h |    7 +++++++

 1 file changed, 7 insertions(+)

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

include/linux/stringify.h line 18

Quoted 10 lines
include/linux/stringify.h +7 -0
@@ -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)
+

that seems hackish...

Quoted 6 lines
include/linux/stringify.h +0 -1
  #endif /* !__LINUX_STRINGIFY_H */
--

To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#14 lore raw
Quoted 15 lines · On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

Quoted 6 lines

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".

Quoted 9 lines

Actually, I used to have a patch to make hex value have a mandatory "0x" prefix, in the Kconfig. I even fixed all the issue in the tree, it never make it to the tree (not sure why). Here's the relevant thread:

https://patchwork.kernel.org/patch/380591/
https://patchwork.kernel.org/patch/380621/
https://patchwork.kernel.org/patch/380601/

I prefer that this be fixed in kconfig, so long as it won't cause any other issues. That's why I mentioned it.

Quoted 14 lines
Quoted 14 lines

---
 include/linux/stringify.h |    7 +++++++

 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
  #define __stringify_1(x...)    #x
  #define __stringify(x...)      __stringify_1(x)
 
Quoted 8 lines

include/linux/stringify.h line 18

Quoted 7 lines
include/linux/stringify.h +7 -0
+/*
+ * 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)
+

that seems hackish...

It's a common idiom for concatenating strings in the kernel.

How would you do it without (instead of) a kconfig fix/patch?

Quoted 2 lines

include/linux/stringify.h

Quoted 2 lines
include/linux/stringify.h +0 -1
  #endif /* !__LINUX_STRINGIFY_H */
--

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#15 lore raw

Hi,

Quoted 53 lines · Randy Dunlap
Quoted 15 lines · On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

Quoted 6 lines

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".

Quoted 9 lines

Actually, I used to have a patch to make hex value have a mandatory "0x" prefix, in the Kconfig. I even fixed all the issue in the tree, it never make it to the tree (not sure why). Here's the relevant thread:

https://patchwork.kernel.org/patch/380591/
https://patchwork.kernel.org/patch/380621/
https://patchwork.kernel.org/patch/380601/

I prefer that this be fixed in kconfig, so long as it won't cause any other issues.  That's why I mentioned it.

Quoted 14 lines
Quoted 14 lines

---
 include/linux/stringify.h |    7 +++++++

 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
  #define __stringify_1(x...)    #x
  #define __stringify(x...)      __stringify_1(x)
 
Quoted 8 lines

include/linux/stringify.h line 18

Quoted 7 lines
include/linux/stringify.h +7 -0
+/*
+ * 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)
+

that seems hackish...

Quoted 2 lines

It's a common idiom for concatenating strings in the kernel.

I meant hackish not because *how* it is done, but because *why* it has to be done, that is, because the Kconfig miss the prefix, which is really no big deal.

Quoted 2 lines

How would you do it without (instead of) a kconfig fix/patch?

have the Kconfig use the "0x" prefix since the beginning.

- Arnaud

Quoted 8 lines
Quoted 2 lines

include/linux/stringify.h

Quoted 2 lines
include/linux/stringify.h +0 -1
  #endif /* !__LINUX_STRINGIFY_H */
--

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#16 lore raw
Quoted 58 lines · On Wed, 13 Jul 2011 18:06:15 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 53 lines · Randy Dunlap
Quoted 15 lines · On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

Quoted 6 lines

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".

Quoted 9 lines

Actually, I used to have a patch to make hex value have a mandatory "0x" prefix, in the Kconfig. I even fixed all the issue in the tree, it never make it to the tree (not sure why). Here's the relevant thread:

https://patchwork.kernel.org/patch/380591/
https://patchwork.kernel.org/patch/380621/
https://patchwork.kernel.org/patch/380601/

I prefer that this be fixed in kconfig, so long as it won't cause any other issues.  That's why I mentioned it.

Quoted 14 lines
Quoted 14 lines

---
 include/linux/stringify.h |    7 +++++++

 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
  #define __stringify_1(x...)    #x
  #define __stringify(x...)      __stringify_1(x)
 
Quoted 8 lines

include/linux/stringify.h line 18

Quoted 7 lines
include/linux/stringify.h +7 -0
+/*
+ * 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)
+

that seems hackish...

Quoted 2 lines

It's a common idiom for concatenating strings in the kernel.

Quoted 7 lines

I meant hackish not because *how* it is done, but because *why* it has to be done, that is, because the Kconfig miss the prefix, which is really no big deal.

Quoted 2 lines

How would you do it without (instead of) a kconfig fix/patch?

have the Kconfig use the "0x" prefix since the beginning.

Sure, go for it. I'll ack it. ;) [or Review it :] and test it.

thanks,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#17 lore raw

Hi,

Quoted 64 lines · Randy Dunlap
Quoted 62 lines · On Wed, 13 Jul 2011 18:06:15 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 53 lines · Randy Dunlap
Quoted 15 lines · On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

Quoted 6 lines

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".

Quoted 9 lines

Actually, I used to have a patch to make hex value have a mandatory "0x" prefix, in the Kconfig. I even fixed all the issue in the tree, it never make it to the tree (not sure why). Here's the relevant thread:

https://patchwork.kernel.org/patch/380591/
https://patchwork.kernel.org/patch/380621/
https://patchwork.kernel.org/patch/380601/

I prefer that this be fixed in kconfig, so long as it won't cause any other issues.  That's why I mentioned it.

Quoted 14 lines
Quoted 14 lines

---
 include/linux/stringify.h |    7 +++++++

 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
  #define __stringify_1(x...)    #x
  #define __stringify(x...)      __stringify_1(x)
 
Quoted 8 lines

include/linux/stringify.h line 18

Quoted 7 lines
include/linux/stringify.h +7 -0
+/*
+ * 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)
+

that seems hackish...

Quoted 2 lines

It's a common idiom for concatenating strings in the kernel.

I meant hackish not because *how* it is done, but because *why* it has to be done, that is, because the Kconfig miss the prefix, which is really no big deal.

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

How would you do it without (instead of) a kconfig fix/patch?

have the Kconfig use the "0x" prefix since the beginning.

Sure, go for it.  I'll ack it.  ;)  [or Review it :] and test it.

it is already among the hunks in https://patchwork.kernel.org/patch/380601/

- Arnaud

#18 lore raw
Quoted 67 lines · On Wed, 13 Jul 2011 18:13:31 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 64 lines · Randy Dunlap
Quoted 62 lines · On Wed, 13 Jul 2011 18:06:15 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 53 lines · Randy Dunlap
Quoted 15 lines · On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:

Hi,

Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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

Quoted 6 lines

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".

Quoted 9 lines

Actually, I used to have a patch to make hex value have a mandatory "0x" prefix, in the Kconfig. I even fixed all the issue in the tree, it never make it to the tree (not sure why). Here's the relevant thread:

https://patchwork.kernel.org/patch/380591/
https://patchwork.kernel.org/patch/380621/
https://patchwork.kernel.org/patch/380601/

I prefer that this be fixed in kconfig, so long as it won't cause any other issues.  That's why I mentioned it.

Quoted 14 lines
Quoted 14 lines

---
 include/linux/stringify.h |    7 +++++++

 1 file changed, 7 insertions(+)

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

include/linux/stringify.h +0 -0
@@ -9,4 +9,11 @@
  #define __stringify_1(x...)    #x
  #define __stringify(x...)      __stringify_1(x)
 
Quoted 8 lines

include/linux/stringify.h line 18

Quoted 7 lines
include/linux/stringify.h +7 -0
+/*
+ * 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)
+

that seems hackish...

Quoted 2 lines

It's a common idiom for concatenating strings in the kernel.

I meant hackish not because *how* it is done, but because *why* it has to be done, that is, because the Kconfig miss the prefix, which is really no big deal.

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

How would you do it without (instead of) a kconfig fix/patch?

have the Kconfig use the "0x" prefix since the beginning.

Sure, go for it.  I'll ack it.  ;)  [or Review it :] and test it.

it is already among the hunks in https://patchwork.kernel.org/patch/380601/

I realize that, but it looks like you may need to resubmit it.

I'll dig it out and test it, maybe even reply to your old patch(es).

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#19 lore raw

Hi,

Quoted 8 lines · Randy Dunlap

[...]

Quoted 4 lines
Quoted 3 lines

Sure, go for it.  I'll ack it.  ;)  [or Review it :] and test it.

it is already among the hunks in https://patchwork.kernel.org/patch/380601/

I realize that, but it looks like you may need to resubmit it.

I have an updated set of patches against -next, I still need to break them down by tree. As a lots of things I did today went completely south, I guess it would be better if I do this task early tomorrow :-)

- Arnaud

#20 lore raw

PATCH 1/1 media/Kconfig: fix hexadecimal prefix for `hex' symbols

In reply to Randy Dunlap
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>
---
 drivers/media/radio/Kconfig |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +8 -8
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK
 config RADIO_RTRACK_PORT
 	hex "RadioTrack i/o port (0x20f or 0x30f)"
 	depends on RADIO_RTRACK=y
-	default "20f"
+	default "0x20f"
 	help
 	  Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you
 	  haven't changed the jumper setting on the card.
@@ -81,7 +81,7 @@ config RADIO_RTRACK2
 config RADIO_RTRACK2_PORT
 	hex "RadioTrack II i/o port (0x20c or 0x30c)"
 	depends on RADIO_RTRACK2=y
-	default "30c"
+	default "0x30c"
 	help
 	  Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you
 	  haven't changed the jumper setting on the card.
@@ -104,7 +104,7 @@ config RADIO_AZTECH
 config RADIO_AZTECH_PORT
 	hex "Aztech/Packard Bell I/O port (0x350 or 0x358)"
 	depends on RADIO_AZTECH=y
-	default "350"
+	default "0x350"
 	help
 	  Enter either 0x350 or 0x358 here.  The card default is 0x350, if you
 	  haven't changed the setting of jumper JP3 on the card.  Removing the
@@ -133,7 +133,7 @@ config RADIO_GEMTEK
 config RADIO_GEMTEK_PORT
 	hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)"
 	depends on RADIO_GEMTEK=y
-	default "34c"
+	default "0x34c"
 	help
 	  Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is
 	  0x34c, if you haven't changed the jumper setting on the card. On
@@ -237,7 +237,7 @@ config RADIO_TERRATEC
 config RADIO_TERRATEC_PORT
 	hex "Terratec i/o port (normally 0x590)"
 	depends on RADIO_TERRATEC=y
-	default "590"
+	default "0x590"
 	help
 	  Fill in the I/O port of your TerraTec FM radio card. If unsure, go
 	  with the default.
@@ -255,7 +255,7 @@ config RADIO_TRUST
 config RADIO_TRUST_PORT
 	hex "Trust i/o port (usually 0x350 or 0x358)"
 	depends on RADIO_TRUST=y
-	default "350"
+	default "0x350"
 	help
 	  Enter the I/O port of your Trust FM radio card. If unsure, try the
 	  values "0x350" or "0x358".
@@ -278,7 +278,7 @@ config RADIO_TYPHOON
 config RADIO_TYPHOON_PORT
 	hex "Typhoon I/O port (0x316 or 0x336)"
 	depends on RADIO_TYPHOON=y
-	default "316"
+	default "0x316"
 	help
 	  Enter the I/O port of your Typhoon or EcoRadio radio card.
 
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX
 config RADIO_ZOLTRIX_PORT
 	hex "ZOLTRIX I/O port (0x20c or 0x30c)"
 	depends on RADIO_ZOLTRIX=y
-	default "20c"
+	default "0x20c"
 	help
 	  Enter the I/O port of your Zoltrix radio card.
 
Signature · 1 line
1.7.3.4.574.g608b.dirty
#21 lore raw

Re: [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols

Em 14-07-2011 14:26, Arnaud Lacombe escreveu:

Quoted 3 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>

Arnaud,

The patch is ok for me. You can add my acked-by, if you want.

However, with 3.0-rc7, this patch and/or Kconfig fixes don't seem to be needed. Basically, include/generated/autoconf.h has "0x" on it:

$ grep CONFIG_RADIO_RTRACK_PORT */*/*
include/config/auto.conf:CONFIG_RADIO_RTRACK_PORT=20f
include/generated/autoconf.h:#define CONFIG_RADIO_RTRACK_PORT 0x20f

Maybe some patch applied at -next from another tree broke that behavior.

IMHO, keeping those values without "0x" at Kconfig seems more intuitive for the end-user, as otherwise a value like "200" would be confusing if this means 200d or 200h.

Anyway, those drivers are very old, and very few people likely still use those old hardware. So, I'm fine if you either want to preserve the current way or to change it.

Cheers,
Mauro.

Quoted 80 lines
---
 drivers/media/radio/Kconfig |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +8 -8
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK
 config RADIO_RTRACK_PORT
 	hex "RadioTrack i/o port (0x20f or 0x30f)"
 	depends on RADIO_RTRACK=y
-	default "20f"
+	default "0x20f"
 	help
 	  Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you
 	  haven't changed the jumper setting on the card.
@@ -81,7 +81,7 @@ config RADIO_RTRACK2
 config RADIO_RTRACK2_PORT
 	hex "RadioTrack II i/o port (0x20c or 0x30c)"
 	depends on RADIO_RTRACK2=y
-	default "30c"
+	default "0x30c"
 	help
 	  Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you
 	  haven't changed the jumper setting on the card.
@@ -104,7 +104,7 @@ config RADIO_AZTECH
 config RADIO_AZTECH_PORT
 	hex "Aztech/Packard Bell I/O port (0x350 or 0x358)"
 	depends on RADIO_AZTECH=y
-	default "350"
+	default "0x350"
 	help
 	  Enter either 0x350 or 0x358 here.  The card default is 0x350, if you
 	  haven't changed the setting of jumper JP3 on the card.  Removing the
@@ -133,7 +133,7 @@ config RADIO_GEMTEK
 config RADIO_GEMTEK_PORT
 	hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)"
 	depends on RADIO_GEMTEK=y
-	default "34c"
+	default "0x34c"
 	help
 	  Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is
 	  0x34c, if you haven't changed the jumper setting on the card. On
@@ -237,7 +237,7 @@ config RADIO_TERRATEC
 config RADIO_TERRATEC_PORT
 	hex "Terratec i/o port (normally 0x590)"
 	depends on RADIO_TERRATEC=y
-	default "590"
+	default "0x590"
 	help
 	  Fill in the I/O port of your TerraTec FM radio card. If unsure, go
 	  with the default.
@@ -255,7 +255,7 @@ config RADIO_TRUST
 config RADIO_TRUST_PORT
 	hex "Trust i/o port (usually 0x350 or 0x358)"
 	depends on RADIO_TRUST=y
-	default "350"
+	default "0x350"
 	help
 	  Enter the I/O port of your Trust FM radio card. If unsure, try the
 	  values "0x350" or "0x358".
@@ -278,7 +278,7 @@ config RADIO_TYPHOON
 config RADIO_TYPHOON_PORT
 	hex "Typhoon I/O port (0x316 or 0x336)"
 	depends on RADIO_TYPHOON=y
-	default "316"
+	default "0x316"
 	help
 	  Enter the I/O port of your Typhoon or EcoRadio radio card.
 
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX
 config RADIO_ZOLTRIX_PORT
 	hex "ZOLTRIX I/O port (0x20c or 0x30c)"
 	depends on RADIO_ZOLTRIX=y
-	default "20c"
+	default "0x20c"
 	help
 	  Enter the I/O port of your Zoltrix radio card.
 
#22 lore raw

Re: [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols

Hi,

Quoted 9 lines · Mauro Carvalho Chehab

Em 14-07-2011 14:26, Arnaud Lacombe escreveu:

Quoted 3 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>

Arnaud,

The patch is ok for me. You can add my acked-by, if you want.

Quoted 9 lines

However, with 3.0-rc7, this patch and/or Kconfig fixes don't seem to be needed. Basically, include/generated/autoconf.h has "0x" on it:

$ grep CONFIG_RADIO_RTRACK_PORT */*/*
include/config/auto.conf:CONFIG_RADIO_RTRACK_PORT=20f
include/generated/autoconf.h:#define CONFIG_RADIO_RTRACK_PORT 0x20f

Maybe some patch applied at -next from another tree broke that behavior.

he ... I (involuntarily) broke that behavior when reworking the way we generate autoconf.h :-)

my bad.

- Arnaud

Quoted 4 lines

IMHO, keeping those values without "0x" at Kconfig seems more intuitive for the end-user, as otherwise a value like "200" would be confusing if this means 200d or 200h.

do you mean more intuitive *with* "0x", not *without* ? This is what I'm thinking too, and why I'd make the "0x" mandatory on HEX symbols.

Quoted 89 lines

Anyway, those drivers are very old, and very few people likely still use those old hardware. So, I'm fine if you either want to preserve the current way or to change it.

Cheers,
Mauro.

Quoted 80 lines

---
 drivers/media/radio/Kconfig |   16 ++++++++--------

 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +0 -0
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK

 config RADIO_RTRACK_PORT
      hex "RadioTrack i/o port (0x20f or 0x30f)"
      depends on RADIO_RTRACK=y
-     default "20f"
+     default "0x20f"
      help
        Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -81,7 +81,7 @@ config RADIO_RTRACK2

 config RADIO_RTRACK2_PORT
      hex "RadioTrack II i/o port (0x20c or 0x30c)"
      depends on RADIO_RTRACK2=y
-     default "30c"
+     default "0x30c"
      help
        Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -104,7 +104,7 @@ config RADIO_AZTECH

 config RADIO_AZTECH_PORT
      hex "Aztech/Packard Bell I/O port (0x350 or 0x358)" depends on RADIO_AZTECH=y
-     default "350"
+     default "0x350"
      help
        Enter either 0x350 or 0x358 here.  The card default is 0x350, if you haven't changed the setting of jumper JP3 on the card.  Removing the

drivers/media/radio/Kconfig +0 -0
@@ -133,7 +133,7 @@ config RADIO_GEMTEK

 config RADIO_GEMTEK_PORT
      hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)" depends on RADIO_GEMTEK=y
-     default "34c"
+     default "0x34c"
      help
        Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is 0x34c, if you haven't changed the jumper setting on the card. On

drivers/media/radio/Kconfig +0 -0
@@ -237,7 +237,7 @@ config RADIO_TERRATEC

 config RADIO_TERRATEC_PORT
      hex "Terratec i/o port (normally 0x590)"
      depends on RADIO_TERRATEC=y
-     default "590"
+     default "0x590"
      help
        Fill in the I/O port of your TerraTec FM radio card. If unsure, go with the default.

drivers/media/radio/Kconfig +0 -0
@@ -255,7 +255,7 @@ config RADIO_TRUST

 config RADIO_TRUST_PORT
      hex "Trust i/o port (usually 0x350 or 0x358)"
      depends on RADIO_TRUST=y
-     default "350"
+     default "0x350"
      help
        Enter the I/O port of your Trust FM radio card. If unsure, try the values "0x350" or "0x358".

drivers/media/radio/Kconfig +0 -0
@@ -278,7 +278,7 @@ config RADIO_TYPHOON

 config RADIO_TYPHOON_PORT
      hex "Typhoon I/O port (0x316 or 0x336)"
      depends on RADIO_TYPHOON=y
-     default "316"
+     default "0x316"
      help
        Enter the I/O port of your Typhoon or EcoRadio radio card.

drivers/media/radio/Kconfig +0 -0
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX

 config RADIO_ZOLTRIX_PORT
      hex "ZOLTRIX I/O port (0x20c or 0x30c)" depends on RADIO_ZOLTRIX=y
-     default "20c"
+     default "0x20c"
      help
        Enter the I/O port of your Zoltrix radio card.

#23 lore raw

Re: [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols

In reply to Mauro Carvalho Chehab

Hi,

Quoted 9 lines · Mauro Carvalho Chehab

Em 14-07-2011 14:26, Arnaud Lacombe escreveu:

Quoted 3 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>

Arnaud,

The patch is ok for me. You can add my acked-by, if you want.

don't you want to take in though the media/video tree for -next ?

- Arnaud

Quoted 102 lines

However, with 3.0-rc7, this patch and/or Kconfig fixes don't seem to be needed. Basically, include/generated/autoconf.h has "0x" on it:

$ grep CONFIG_RADIO_RTRACK_PORT */*/*
include/config/auto.conf:CONFIG_RADIO_RTRACK_PORT=20f
include/generated/autoconf.h:#define CONFIG_RADIO_RTRACK_PORT 0x20f

Maybe some patch applied at -next from another tree broke that behavior.

IMHO, keeping those values without "0x" at Kconfig seems more intuitive for the end-user, as otherwise a value like "200" would be confusing if this means 200d or 200h.

Anyway, those drivers are very old, and very few people likely still use those old hardware. So, I'm fine if you either want to preserve the current way or to change it.

Cheers,
Mauro.

Quoted 80 lines

---
 drivers/media/radio/Kconfig |   16 ++++++++--------

 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +0 -0
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK

 config RADIO_RTRACK_PORT
      hex "RadioTrack i/o port (0x20f or 0x30f)"
      depends on RADIO_RTRACK=y
-     default "20f"
+     default "0x20f"
      help
        Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -81,7 +81,7 @@ config RADIO_RTRACK2

 config RADIO_RTRACK2_PORT
      hex "RadioTrack II i/o port (0x20c or 0x30c)"
      depends on RADIO_RTRACK2=y
-     default "30c"
+     default "0x30c"
      help
        Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -104,7 +104,7 @@ config RADIO_AZTECH

 config RADIO_AZTECH_PORT
      hex "Aztech/Packard Bell I/O port (0x350 or 0x358)" depends on RADIO_AZTECH=y
-     default "350"
+     default "0x350"
      help
        Enter either 0x350 or 0x358 here.  The card default is 0x350, if you haven't changed the setting of jumper JP3 on the card.  Removing the

drivers/media/radio/Kconfig +0 -0
@@ -133,7 +133,7 @@ config RADIO_GEMTEK

 config RADIO_GEMTEK_PORT
      hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)" depends on RADIO_GEMTEK=y
-     default "34c"
+     default "0x34c"
      help
        Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is 0x34c, if you haven't changed the jumper setting on the card. On

drivers/media/radio/Kconfig +0 -0
@@ -237,7 +237,7 @@ config RADIO_TERRATEC

 config RADIO_TERRATEC_PORT
      hex "Terratec i/o port (normally 0x590)"
      depends on RADIO_TERRATEC=y
-     default "590"
+     default "0x590"
      help
        Fill in the I/O port of your TerraTec FM radio card. If unsure, go with the default.

drivers/media/radio/Kconfig +0 -0
@@ -255,7 +255,7 @@ config RADIO_TRUST

 config RADIO_TRUST_PORT
      hex "Trust i/o port (usually 0x350 or 0x358)"
      depends on RADIO_TRUST=y
-     default "350"
+     default "0x350"
      help
        Enter the I/O port of your Trust FM radio card. If unsure, try the values "0x350" or "0x358".

drivers/media/radio/Kconfig +0 -0
@@ -278,7 +278,7 @@ config RADIO_TYPHOON

 config RADIO_TYPHOON_PORT
      hex "Typhoon I/O port (0x316 or 0x336)"
      depends on RADIO_TYPHOON=y
-     default "316"
+     default "0x316"
      help
        Enter the I/O port of your Typhoon or EcoRadio radio card.

drivers/media/radio/Kconfig +0 -0
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX

 config RADIO_ZOLTRIX_PORT
      hex "ZOLTRIX I/O port (0x20c or 0x30c)" depends on RADIO_ZOLTRIX=y
-     default "20c"
+     default "0x20c"
      help
        Enter the I/O port of your Zoltrix radio card.

#24 lore raw

Re: [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols

Em 14-07-2011 20:32, Arnaud Lacombe escreveu:

Quoted 9 lines

Hi,

Quoted 5 lines · Mauro Carvalho Chehab

Em 14-07-2011 14:26, Arnaud Lacombe escreveu:

Quoted 3 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>
Quoted 5 lines
Quoted 4 lines

Arnaud,

The patch is ok for me. You can add my acked-by, if you want.

don't you want to take in though the media/video tree for -next ?

It seems better if you could put it on your tree, before the patch that broke the Kconfig. Otherwise, you'll need to wait for my merge upstream, before being sending yours, to avoid breaking git bisect.

Anyway, I'm ok to add it into my tree if you prefer this way.

Thanks!
Mauro

Quoted 105 lines

- Arnaud

Quoted 102 lines

However, with 3.0-rc7, this patch and/or Kconfig fixes don't seem to be needed. Basically, include/generated/autoconf.h has "0x" on it:

$ grep CONFIG_RADIO_RTRACK_PORT */*/*
include/config/auto.conf:CONFIG_RADIO_RTRACK_PORT=20f
include/generated/autoconf.h:#define CONFIG_RADIO_RTRACK_PORT 0x20f

Maybe some patch applied at -next from another tree broke that behavior.

IMHO, keeping those values without "0x" at Kconfig seems more intuitive for the end-user, as otherwise a value like "200" would be confusing if this means 200d or 200h.

Anyway, those drivers are very old, and very few people likely still use those old hardware. So, I'm fine if you either want to preserve the current way or to change it.

Cheers,
Mauro.

Quoted 80 lines
---
 drivers/media/radio/Kconfig |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +8 -8
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK
 config RADIO_RTRACK_PORT
      hex "RadioTrack i/o port (0x20f or 0x30f)"
      depends on RADIO_RTRACK=y
-     default "20f"
+     default "0x20f"
      help
        Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you
        haven't changed the jumper setting on the card.
@@ -81,7 +81,7 @@ config RADIO_RTRACK2
 config RADIO_RTRACK2_PORT
      hex "RadioTrack II i/o port (0x20c or 0x30c)"
      depends on RADIO_RTRACK2=y
-     default "30c"
+     default "0x30c"
      help
        Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you
        haven't changed the jumper setting on the card.
@@ -104,7 +104,7 @@ config RADIO_AZTECH
 config RADIO_AZTECH_PORT
      hex "Aztech/Packard Bell I/O port (0x350 or 0x358)"
      depends on RADIO_AZTECH=y
-     default "350"
+     default "0x350"
      help
        Enter either 0x350 or 0x358 here.  The card default is 0x350, if you
        haven't changed the setting of jumper JP3 on the card.  Removing the
@@ -133,7 +133,7 @@ config RADIO_GEMTEK
 config RADIO_GEMTEK_PORT
      hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)"
      depends on RADIO_GEMTEK=y
-     default "34c"
+     default "0x34c"
      help
        Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is
        0x34c, if you haven't changed the jumper setting on the card. On
@@ -237,7 +237,7 @@ config RADIO_TERRATEC
 config RADIO_TERRATEC_PORT
      hex "Terratec i/o port (normally 0x590)"
      depends on RADIO_TERRATEC=y
-     default "590"
+     default "0x590"
      help
        Fill in the I/O port of your TerraTec FM radio card. If unsure, go
        with the default.
@@ -255,7 +255,7 @@ config RADIO_TRUST
 config RADIO_TRUST_PORT
      hex "Trust i/o port (usually 0x350 or 0x358)"
      depends on RADIO_TRUST=y
-     default "350"
+     default "0x350"
      help
        Enter the I/O port of your Trust FM radio card. If unsure, try the
        values "0x350" or "0x358".
@@ -278,7 +278,7 @@ config RADIO_TYPHOON
 config RADIO_TYPHOON_PORT
      hex "Typhoon I/O port (0x316 or 0x336)"
      depends on RADIO_TYPHOON=y
-     default "316"
+     default "0x316"
      help
        Enter the I/O port of your Typhoon or EcoRadio radio card.
 
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX
 config RADIO_ZOLTRIX_PORT
      hex "ZOLTRIX I/O port (0x20c or 0x30c)"
      depends on RADIO_ZOLTRIX=y
-     default "20c"
+     default "0x20c"
      help
        Enter the I/O port of your Zoltrix radio card.
 
#25 lore raw

Re: [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols

Hi,

[Add Michal to the Cc: list.]

Quoted 12 lines · Mauro Carvalho Chehab

Em 14-07-2011 20:32, Arnaud Lacombe escreveu:

Quoted 11 lines

Hi,

Quoted 7 lines · Mauro Carvalho Chehab

Em 14-07-2011 14:26, Arnaud Lacombe escreveu:

Quoted 3 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>

Arnaud,

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

The patch is ok for me. You can add my acked-by, if you want.

don't you want to take in though the media/video tree for -next ?

It seems better if you could put it on your tree, before the patch that broke the Kconfig. Otherwise, you'll need to wait for my merge upstream, before being sending yours, to avoid breaking git bisect.

Technically, I do not have any tree, Michal does :) That said, both patch are completely independent and both fix the issue. So you can take this patch, for the sake of having prefixed hexadecimal value when the user is editing the config, in the mean time, Michal can merge the fix.

Quoted 2 lines

Anyway, I'm ok to add it into my tree if you prefer this way.

I guess it is the easiest.

Btw, Randy's earliest patch will no longer be needed too.

Thanks,
- Arnaud

Quoted 110 lines

Thanks!
Mauro

Quoted 105 lines

 - Arnaud

Quoted 102 lines

However, with 3.0-rc7, this patch and/or Kconfig fixes don't seem to be needed. Basically, include/generated/autoconf.h has "0x" on it:

$ grep CONFIG_RADIO_RTRACK_PORT */*/*
include/config/auto.conf:CONFIG_RADIO_RTRACK_PORT=20f
include/generated/autoconf.h:#define CONFIG_RADIO_RTRACK_PORT 0x20f

Maybe some patch applied at -next from another tree broke that behavior.

IMHO, keeping those values without "0x" at Kconfig seems more intuitive for the end-user, as otherwise a value like "200" would be confusing if this means 200d or 200h.

Anyway, those drivers are very old, and very few people likely still use those old hardware. So, I'm fine if you either want to preserve the current way or to change it.

Cheers,
Mauro.

Quoted 80 lines

---
 drivers/media/radio/Kconfig |   16 ++++++++--------

 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +0 -0
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK

 config RADIO_RTRACK_PORT
      hex "RadioTrack i/o port (0x20f or 0x30f)"
      depends on RADIO_RTRACK=y
-     default "20f"
+     default "0x20f"
      help
        Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -81,7 +81,7 @@ config RADIO_RTRACK2

 config RADIO_RTRACK2_PORT
      hex "RadioTrack II i/o port (0x20c or 0x30c)"
      depends on RADIO_RTRACK2=y
-     default "30c"
+     default "0x30c"
      help
        Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -104,7 +104,7 @@ config RADIO_AZTECH

 config RADIO_AZTECH_PORT
      hex "Aztech/Packard Bell I/O port (0x350 or 0x358)" depends on RADIO_AZTECH=y
-     default "350"
+     default "0x350"
      help
        Enter either 0x350 or 0x358 here.  The card default is 0x350, if you haven't changed the setting of jumper JP3 on the card.  Removing the

drivers/media/radio/Kconfig +0 -0
@@ -133,7 +133,7 @@ config RADIO_GEMTEK

 config RADIO_GEMTEK_PORT
      hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)" depends on RADIO_GEMTEK=y
-     default "34c"
+     default "0x34c"
      help
        Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is 0x34c, if you haven't changed the jumper setting on the card. On

drivers/media/radio/Kconfig +0 -0
@@ -237,7 +237,7 @@ config RADIO_TERRATEC

 config RADIO_TERRATEC_PORT
      hex "Terratec i/o port (normally 0x590)"
      depends on RADIO_TERRATEC=y
-     default "590"
+     default "0x590"
      help
        Fill in the I/O port of your TerraTec FM radio card. If unsure, go with the default.

drivers/media/radio/Kconfig +0 -0
@@ -255,7 +255,7 @@ config RADIO_TRUST

 config RADIO_TRUST_PORT
      hex "Trust i/o port (usually 0x350 or 0x358)"
      depends on RADIO_TRUST=y
-     default "350"
+     default "0x350"
      help
        Enter the I/O port of your Trust FM radio card. If unsure, try the values "0x350" or "0x358".

drivers/media/radio/Kconfig +0 -0
@@ -278,7 +278,7 @@ config RADIO_TYPHOON

 config RADIO_TYPHOON_PORT
      hex "Typhoon I/O port (0x316 or 0x336)"
      depends on RADIO_TYPHOON=y
-     default "316"
+     default "0x316"
      help
        Enter the I/O port of your Typhoon or EcoRadio radio card.

drivers/media/radio/Kconfig +0 -0
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX

 config RADIO_ZOLTRIX_PORT
      hex "ZOLTRIX I/O port (0x20c or 0x30c)" depends on RADIO_ZOLTRIX=y
-     default "20c"
+     default "0x20c"
      help
        Enter the I/O port of your Zoltrix radio card.

#26 lore raw

Re: [PATCH] media/Kconfig: fix hexadecimal prefix for `hex' symbols

In reply to Arnaud Lacombe

Hi Mauro,

Quoted 4 lines · Arnaud Lacombe
Cc Mauro Carvalho Chehab <[email protected]>
Cc Randy Dunlap <[email protected]>

AFAICS, as of -next-20110722, you never grabbed that patch, any specific reason ?

Thanks,
- Arnaud

Quoted 84 lines

---
 drivers/media/radio/Kconfig |   16 ++++++++--------

 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/media/radio/Kconfig +0 -0
index e4c97fd..9cab04d 100644
@@ -58,7 +58,7 @@ config RADIO_RTRACK

 config RADIO_RTRACK_PORT
       hex "RadioTrack i/o port (0x20f or 0x30f)"
       depends on RADIO_RTRACK=y
-       default "20f"
+       default "0x20f"
       help
         Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -81,7 +81,7 @@ config RADIO_RTRACK2

 config RADIO_RTRACK2_PORT
       hex "RadioTrack II i/o port (0x20c or 0x30c)"
       depends on RADIO_RTRACK2=y
-       default "30c"
+       default "0x30c"
       help
         Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you haven't changed the jumper setting on the card.

drivers/media/radio/Kconfig +0 -0
@@ -104,7 +104,7 @@ config RADIO_AZTECH

 config RADIO_AZTECH_PORT
       hex "Aztech/Packard Bell I/O port (0x350 or 0x358)" depends on RADIO_AZTECH=y
-       default "350"
+       default "0x350"
       help
         Enter either 0x350 or 0x358 here.  The card default is 0x350, if you haven't changed the setting of jumper JP3 on the card.  Removing the

drivers/media/radio/Kconfig +0 -0
@@ -133,7 +133,7 @@ config RADIO_GEMTEK

 config RADIO_GEMTEK_PORT
       hex "Fixed I/O port (0x20c, 0x30c, 0x24c, 0x34c, 0c24c or 0x28c)" depends on RADIO_GEMTEK=y
-       default "34c"
+       default "0x34c"
       help
         Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is 0x34c, if you haven't changed the jumper setting on the card. On

drivers/media/radio/Kconfig +0 -0
@@ -237,7 +237,7 @@ config RADIO_TERRATEC

 config RADIO_TERRATEC_PORT
       hex "Terratec i/o port (normally 0x590)"
       depends on RADIO_TERRATEC=y
-       default "590"
+       default "0x590"
       help
         Fill in the I/O port of your TerraTec FM radio card. If unsure, go with the default.

drivers/media/radio/Kconfig +0 -0
@@ -255,7 +255,7 @@ config RADIO_TRUST

 config RADIO_TRUST_PORT
       hex "Trust i/o port (usually 0x350 or 0x358)"
       depends on RADIO_TRUST=y
-       default "350"
+       default "0x350"
       help
         Enter the I/O port of your Trust FM radio card. If unsure, try the values "0x350" or "0x358".

drivers/media/radio/Kconfig +0 -0
@@ -278,7 +278,7 @@ config RADIO_TYPHOON

 config RADIO_TYPHOON_PORT
       hex "Typhoon I/O port (0x316 or 0x336)"
       depends on RADIO_TYPHOON=y
-       default "316"
+       default "0x316"
       help
         Enter the I/O port of your Typhoon or EcoRadio radio card.

drivers/media/radio/Kconfig +0 -0
@@ -312,7 +312,7 @@ config RADIO_ZOLTRIX

 config RADIO_ZOLTRIX_PORT
       hex "ZOLTRIX I/O port (0x20c or 0x30c)" depends on RADIO_ZOLTRIX=y
-       default "20c"
+       default "0x20c"
       help
         Enter the I/O port of your Zoltrix radio card.

--
1.7.3.4.574.g608b.dirty