* 2.6.0-test7: saa7134 breaks on gcc 2.95
@ 2003-10-15 0:38 Eyal Lebedinsky
2003-10-15 0:59 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Eyal Lebedinsky @ 2003-10-15 0:38 UTC (permalink / raw)
To: list linux-kernel
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
This compiler does not like dangling comma in funcs, so this patch
is needed. For:
#define dprintk(fmt, arg...) if (core_debug) \
printk(KERN_DEBUG "%s/core: " fmt, dev->name, ## arg)
Lines like this:
dprintk("hwinit1\n");
should be hacked like this:
dprintk("hwinit1\n", "");
Or maybe someone knows a better solution.
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
[-- Attachment #2: 2.6.0-test7.saa7134-core.patch --]
[-- Type: text/plain, Size: 821 bytes --]
--- linux/drivers/media/video/saa7134/saa7134-core.c.orig Wed Oct 15 10:30:44 2003
+++ linux/drivers/media/video/saa7134/saa7134-core.c Wed Oct 15 10:31:10 2003
@@ -624,7 +624,7 @@
/* early init (no i2c, no irq) */
static int saa7134_hwinit1(struct saa7134_dev *dev)
{
- dprintk("hwinit1\n");
+ dprintk("hwinit1\n", "");
saa_writel(SAA7134_IRQ1, 0);
saa_writel(SAA7134_IRQ2, 0);
@@ -675,7 +675,7 @@
/* late init (with i2c + irq) */
static int saa7134_hwinit2(struct saa7134_dev *dev)
{
- dprintk("hwinit2\n");
+ dprintk("hwinit2\n", "");
saa7134_video_init2(dev);
saa7134_tvaudio_init2(dev);
@@ -703,7 +703,7 @@
/* shutdown */
static int saa7134_hwfini(struct saa7134_dev *dev)
{
- dprintk("hwfini\n");
+ dprintk("hwfini\n", "");
switch (dev->pci->device) {
case PCI_DEVICE_ID_PHILIPS_SAA7134:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.0-test7: saa7134 breaks on gcc 2.95
2003-10-15 0:38 2.6.0-test7: saa7134 breaks on gcc 2.95 Eyal Lebedinsky
@ 2003-10-15 0:59 ` Andrew Morton
2003-10-15 5:16 ` Ingo Oeser
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2003-10-15 0:59 UTC (permalink / raw)
To: Eyal Lebedinsky; +Cc: linux-kernel
Eyal Lebedinsky <eyal@eyal.emu.id.au> wrote:
>
> This compiler does not like dangling comma in funcs, so this patch
> is needed. For:
>
> #define dprintk(fmt, arg...) if (core_debug) \
> printk(KERN_DEBUG "%s/core: " fmt, dev->name, ## arg)
>
> Lines like this:
>
> dprintk("hwinit1\n");
>
> should be hacked like this:
>
> dprintk("hwinit1\n", "");
I couldn't find a sane way. Ended up doing this:
diff -puN drivers/media/video/saa7134/saa7134-core.c~saa7134-build-fix drivers/media/video/saa7134/saa7134-core.c
--- 25/drivers/media/video/saa7134/saa7134-core.c~saa7134-build-fix 2003-10-13 22:43:15.000000000 -0700
+++ 25-akpm/drivers/media/video/saa7134/saa7134-core.c 2003-10-13 22:43:15.000000000 -0700
@@ -94,8 +94,13 @@ MODULE_PARM_DESC(latency,"pci latency ti
struct list_head saa7134_devlist;
unsigned int saa7134_devcount;
-#define dprintk(fmt, arg...) if (core_debug) \
- printk(KERN_DEBUG "%s/core: " fmt, dev->name, ## arg)
+#define dprintk(fmt, arg...) \
+ do { \
+ if (core_debug) { \
+ printk(KERN_DEBUG "%s/core: ", dev->name); \
+ printk(fmt, ## arg); \
+ } \
+ } while (0)
/* ------------------------------------------------------------------ */
/* debug help functions */
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.0-test7: saa7134 breaks on gcc 2.95
2003-10-15 0:59 ` Andrew Morton
@ 2003-10-15 5:16 ` Ingo Oeser
2003-10-15 5:34 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Ingo Oeser @ 2003-10-15 5:16 UTC (permalink / raw)
To: Andrew Morton, Eyal Lebedinsky; +Cc: linux-kernel
On Wednesday 15 October 2003 02:59, Andrew Morton wrote:
> Eyal Lebedinsky <eyal@eyal.emu.id.au> wrote:
> > This compiler does not like dangling comma in funcs, so this patch
> > is needed. For:
> >
> > #define dprintk(fmt, arg...) if (core_debug) \
> > printk(KERN_DEBUG "%s/core: " fmt, dev->name, ## arg)
> >
> > Lines like this:
> >
> > dprintk("hwinit1\n");
> >
> > should be hacked like this:
> >
> > dprintk("hwinit1\n", "");
>
> I couldn't find a sane way. Ended up doing this:
[splitting the printk]
GCC 2.95 doesn't like no space BEFORE AND AFTER the comma in the argument right
before the "## arg".
So just having a space there should work without splitting the printk. Not
compile tested, since I need to go now.
Regards
Ingo Oeser
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.0-test7: saa7134 breaks on gcc 2.95
2003-10-15 5:16 ` Ingo Oeser
@ 2003-10-15 5:34 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2003-10-15 5:34 UTC (permalink / raw)
To: Ingo Oeser; +Cc: eyal, linux-kernel
Ingo Oeser <ioe-lkml@rameria.de> wrote:
>
> GCC 2.95 doesn't like no space BEFORE AND AFTER the comma in the argument right
> before the "## arg".
Yup.
--- 25/drivers/media/video/saa7134/saa7134-core.c~a Tue Oct 14 22:29:09 2003
+++ 25-akpm/drivers/media/video/saa7134/saa7134-core.c Tue Oct 14 22:29:25 2003
@@ -95,7 +95,7 @@ struct list_head saa7134_devlist;
unsigned int saa7134_devcount;
#define dprintk(fmt, arg...) if (core_debug) \
- printk(KERN_DEBUG "%s/core: " fmt, dev->name, ## arg)
+ printk(KERN_DEBUG "%s/core: " fmt, dev->name , ## arg)
/* ------------------------------------------------------------------ */
/* debug help functions */
_
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-15 5:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 0:38 2.6.0-test7: saa7134 breaks on gcc 2.95 Eyal Lebedinsky
2003-10-15 0:59 ` Andrew Morton
2003-10-15 5:16 ` Ingo Oeser
2003-10-15 5:34 ` Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.