* [PATCH 1/9] stringify: add HEX_STRING()
@ 2011-07-10 19:51 Randy Dunlap
2011-07-10 19:53 ` [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT Randy Dunlap
` (9 more replies)
0 siblings, 10 replies; 20+ 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] 20+ messages in thread
* [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
@ 2011-07-10 19:53 ` Randy Dunlap
2011-07-15 1:44 ` Arnaud Lacombe
2011-07-10 19:54 ` [PATCH 3/9] media/radio: fix aztech " Randy Dunlap
` (8 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:53 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-aimslab.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-aimslab.c
+++ linux-next-20110707/drivers/media/radio/radio-aimslab.c
@@ -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);
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/9] media/radio: fix aztech CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
2011-07-10 19:53 ` [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT Randy Dunlap
@ 2011-07-10 19:54 ` Randy Dunlap
2011-07-10 19:55 ` [PATCH 4/9] media/radio: fix gemtek " Randy Dunlap
` (7 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:54 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-aztech.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-aztech.c
+++ linux-next-20110707/drivers/media/radio/radio-aztech.c
@@ -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;
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 4/9] media/radio: fix gemtek CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
2011-07-10 19:53 ` [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT Randy Dunlap
2011-07-10 19:54 ` [PATCH 3/9] media/radio: fix aztech " Randy Dunlap
@ 2011-07-10 19:55 ` Randy Dunlap
2011-07-10 19:56 ` [PATCH 5/9] media/radio: fix rtrack2 " Randy Dunlap
` (6 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:55 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-gemtek.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-gemtek.c
+++ linux-next-20110707/drivers/media/radio/radio-gemtek.c
@@ -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;
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 5/9] media/radio: fix rtrack2 CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (2 preceding siblings ...)
2011-07-10 19:55 ` [PATCH 4/9] media/radio: fix gemtek " Randy Dunlap
@ 2011-07-10 19:56 ` Randy Dunlap
2011-07-10 19:57 ` [PATCH 6/9] media/radio: fix terratec " Randy Dunlap
` (5 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:56 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-rtrack2.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-rtrack2.c
+++ linux-next-20110707/drivers/media/radio/radio-rtrack2.c
@@ -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);
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 6/9] media/radio: fix terratec CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (3 preceding siblings ...)
2011-07-10 19:56 ` [PATCH 5/9] media/radio: fix rtrack2 " Randy Dunlap
@ 2011-07-10 19:57 ` Randy Dunlap
2011-07-10 19:58 ` [PATCH 7/9] media/radio: fix trust " Randy Dunlap
` (4 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:57 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-terratec.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-terratec.c
+++ linux-next-20110707/drivers/media/radio/radio-terratec.c
@@ -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);
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 7/9] media/radio: fix trust CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (4 preceding siblings ...)
2011-07-10 19:57 ` [PATCH 6/9] media/radio: fix terratec " Randy Dunlap
@ 2011-07-10 19:58 ` Randy Dunlap
2011-07-10 19:59 ` [PATCH 8/9] media/radio: fix typhoon " Randy Dunlap
` (3 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:58 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-trust.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-trust.c
+++ linux-next-20110707/drivers/media/radio/radio-trust.c
@@ -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);
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 8/9] media/radio: fix typhoon CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (5 preceding siblings ...)
2011-07-10 19:58 ` [PATCH 7/9] media/radio: fix trust " Randy Dunlap
@ 2011-07-10 19:59 ` Randy Dunlap
2011-07-10 19:59 ` [PATCH 9/9] media/radio: fix zoltrix " Randy Dunlap
` (2 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:59 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-typhoon.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-typhoon.c
+++ linux-next-20110707/drivers/media/radio/radio-typhoon.c
@@ -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);
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 9/9] media/radio: fix zoltrix CONFIG IO PORT
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (6 preceding siblings ...)
2011-07-10 19:59 ` [PATCH 8/9] media/radio: fix typhoon " Randy Dunlap
@ 2011-07-10 19:59 ` Randy Dunlap
2011-07-13 21:05 ` [PATCH 1/9] stringify: add HEX_STRING() Mauro Carvalho Chehab
2011-07-13 21:49 ` Arnaud Lacombe
9 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-10 19:59 UTC (permalink / raw)
To: lkml; +Cc: linux-media, mchehab
From: Randy Dunlap <rdunlap@xenotime.net>
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
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-zoltrix.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-zoltrix.c
+++ linux-next-20110707/drivers/media/radio/radio-zoltrix.c
@@ -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);
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (7 preceding siblings ...)
2011-07-10 19:59 ` [PATCH 9/9] media/radio: fix zoltrix " 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
9 siblings, 2 replies; 20+ messages in thread
From: Mauro Carvalho Chehab @ 2011-07-13 21:05 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, linux-kbuild, linux-media
Em 10-07-2011 16:51, Randy Dunlap escreveu:
> 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".
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.
>
> 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] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 21:05 ` [PATCH 1/9] stringify: add HEX_STRING() Mauro Carvalho Chehab
@ 2011-07-13 21:11 ` Randy Dunlap
2011-07-13 22:04 ` Randy Dunlap
1 sibling, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-13 21:11 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: lkml, linux-kbuild, linux-media
On Wed, 13 Jul 2011 18:05:45 -0300 Mauro Carvalho Chehab wrote:
> Em 10-07-2011 16:51, Randy Dunlap escreveu:
> > 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".
>
> 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.
> $ 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.
>
> >
> > 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 */
>
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-10 19:51 [PATCH 1/9] stringify: add HEX_STRING() Randy Dunlap
` (8 preceding siblings ...)
2011-07-13 21:05 ` [PATCH 1/9] stringify: add HEX_STRING() Mauro Carvalho Chehab
@ 2011-07-13 21:49 ` Arnaud Lacombe
2011-07-13 22:00 ` Randy Dunlap
9 siblings, 1 reply; 20+ messages in thread
From: Arnaud Lacombe @ 2011-07-13 21:49 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, linux-kbuild, linux-media, mchehab
Hi,
On Sun, Jul 10, 2011 at 3:51 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> 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".
>
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
> 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)
> +
that seems hackish...
> #endif /* !__LINUX_STRINGIFY_H */
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 21:49 ` Arnaud Lacombe
@ 2011-07-13 22:00 ` Randy Dunlap
2011-07-13 22:06 ` Arnaud Lacombe
0 siblings, 1 reply; 20+ messages in thread
From: Randy Dunlap @ 2011-07-13 22:00 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: lkml, linux-kbuild, linux-media, mchehab
On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:
> Hi,
>
> On Sun, Jul 10, 2011 at 3:51 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > 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".
> >
> 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.
>
> > 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)
> > +
> 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?
> > #endif /* !__LINUX_STRINGIFY_H */
> > --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 21:05 ` [PATCH 1/9] stringify: add HEX_STRING() Mauro Carvalho Chehab
2011-07-13 21:11 ` Randy Dunlap
@ 2011-07-13 22:04 ` Randy Dunlap
1 sibling, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2011-07-13 22:04 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: lkml, linux-kbuild, linux-media
On Wed, 13 Jul 2011 18:05:45 -0300 Mauro Carvalho Chehab wrote:
> Em 10-07-2011 16:51, Randy Dunlap escreveu:
> > 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".
>
> 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
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.
> 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;
> >
> > 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 */
>
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 22:00 ` Randy Dunlap
@ 2011-07-13 22:06 ` Arnaud Lacombe
2011-07-13 22:08 ` Randy Dunlap
0 siblings, 1 reply; 20+ messages in thread
From: Arnaud Lacombe @ 2011-07-13 22:06 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, linux-kbuild, linux-media, mchehab
Hi,
On Wed, Jul 13, 2011 at 6:00 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:
>
>> Hi,
>>
>> On Sun, Jul 10, 2011 at 3:51 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
>> > 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".
>> >
>> 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.
>
>>
>> > 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)
>> > +
>> that seems hackish...
>
> 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.
> How would you do it without (instead of) a kconfig fix/patch?
>
have the Kconfig use the "0x" prefix since the beginning.
- Arnaud
>> > #endif /* !__LINUX_STRINGIFY_H */
>> > --
>
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 22:06 ` Arnaud Lacombe
@ 2011-07-13 22:08 ` Randy Dunlap
2011-07-13 22:13 ` Arnaud Lacombe
0 siblings, 1 reply; 20+ messages in thread
From: Randy Dunlap @ 2011-07-13 22:08 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: lkml, linux-kbuild, linux-media, mchehab
On Wed, 13 Jul 2011 18:06:15 -0400 Arnaud Lacombe wrote:
> Hi,
>
> On Wed, Jul 13, 2011 at 6:00 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:
> >
> >> Hi,
> >>
> >> On Sun, Jul 10, 2011 at 3:51 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> >> > 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".
> >> >
> >> 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.
> >
> >>
> >> > 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)
> >> > +
> >> that seems hackish...
> >
> > 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.
>
> > 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 ***
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 22:08 ` Randy Dunlap
@ 2011-07-13 22:13 ` Arnaud Lacombe
2011-07-13 22:17 ` Randy Dunlap
0 siblings, 1 reply; 20+ messages in thread
From: Arnaud Lacombe @ 2011-07-13 22:13 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, linux-kbuild, linux-media, mchehab
Hi,
On Wed, Jul 13, 2011 at 6:08 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On Wed, 13 Jul 2011 18:06:15 -0400 Arnaud Lacombe wrote:
>
>> Hi,
>>
>> On Wed, Jul 13, 2011 at 6:00 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
>> > On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:
>> >
>> >> Hi,
>> >>
>> >> On Sun, Jul 10, 2011 at 3:51 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
>> >> > 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".
>> >> >
>> >> 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.
>> >
>> >>
>> >> > 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)
>> >> > +
>> >> that seems hackish...
>> >
>> > 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.
>>
>> > 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
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 22:13 ` Arnaud Lacombe
@ 2011-07-13 22:17 ` Randy Dunlap
2011-07-14 4:03 ` Arnaud Lacombe
0 siblings, 1 reply; 20+ messages in thread
From: Randy Dunlap @ 2011-07-13 22:17 UTC (permalink / raw)
To: Arnaud Lacombe; +Cc: lkml, linux-kbuild, linux-media, mchehab
On Wed, 13 Jul 2011 18:13:31 -0400 Arnaud Lacombe wrote:
> Hi,
>
> On Wed, Jul 13, 2011 at 6:08 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> > On Wed, 13 Jul 2011 18:06:15 -0400 Arnaud Lacombe wrote:
> >
> >> Hi,
> >>
> >> On Wed, Jul 13, 2011 at 6:00 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> >> > On Wed, 13 Jul 2011 17:49:48 -0400 Arnaud Lacombe wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> On Sun, Jul 10, 2011 at 3:51 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> >> >> > 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".
> >> >> >
> >> >> 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.
> >> >
> >> >>
> >> >> > 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)
> >> >> > +
> >> >> that seems hackish...
> >> >
> >> > 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.
> >>
> >> > 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 ***
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/9] stringify: add HEX_STRING()
2011-07-13 22:17 ` Randy Dunlap
@ 2011-07-14 4:03 ` Arnaud Lacombe
0 siblings, 0 replies; 20+ messages in thread
From: Arnaud Lacombe @ 2011-07-14 4:03 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, linux-kbuild, linux-media, mchehab
Hi,
On Wed, Jul 13, 2011 at 6:17 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> [...]
>> > 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
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT
2011-07-10 19:53 ` [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT Randy Dunlap
@ 2011-07-15 1:44 ` Arnaud Lacombe
0 siblings, 0 replies; 20+ messages in thread
From: Arnaud Lacombe @ 2011-07-15 1:44 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, linux-media, mchehab
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
On Sun, Jul 10, 2011 at 3:53 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> 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
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> drivers/media/radio/radio-aimslab.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> --- linux-next-20110707.orig/drivers/media/radio/radio-aimslab.c
> +++ linux-next-20110707/drivers/media/radio/radio-aimslab.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2011-07-15 1:44 UTC | newest]
Thread overview: 20+ 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-10 19:53 ` [PATCH 2/9] media/radio: fix aimslab CONFIG IO PORT Randy Dunlap
2011-07-15 1:44 ` Arnaud Lacombe
2011-07-10 19:54 ` [PATCH 3/9] media/radio: fix aztech " Randy Dunlap
2011-07-10 19:55 ` [PATCH 4/9] media/radio: fix gemtek " Randy Dunlap
2011-07-10 19:56 ` [PATCH 5/9] media/radio: fix rtrack2 " Randy Dunlap
2011-07-10 19:57 ` [PATCH 6/9] media/radio: fix terratec " Randy Dunlap
2011-07-10 19:58 ` [PATCH 7/9] media/radio: fix trust " Randy Dunlap
2011-07-10 19:59 ` [PATCH 8/9] media/radio: fix typhoon " Randy Dunlap
2011-07-10 19:59 ` [PATCH 9/9] media/radio: fix zoltrix " Randy Dunlap
2011-07-13 21:05 ` [PATCH 1/9] stringify: add HEX_STRING() 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®