Re: 2.4.5 and gcc v3 final

2001-06-26 Thread Anuradha Ratnaweera

On Tue, Jun 26, 2001 at 12:41:49AM +0200, Andreas Bombe wrote:
> 
> But the first example contains three newlines, the second just one.  A
> thing to keep in mind when going around fixing these multi line strings,
> explicit newlines have to be added.

Some code contains very long lines (around 150 characters per line) and others
tend to limit lines to 72-80 lines.

And strings have been broken in the middle _just_ to keep the lines short, and
sometimes without caring about the additional newline. In such cases, either,
the lines should be merged or a backslash should be added to the end(s) of the
line(s).

Please refer to my patch (GCC v3 warning fixes #1) for examples.

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

Journalism is literature in a hurry.
-- Matthew Arnold

-
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/



Re: 2.4.5 and gcc v3 final

2001-06-26 Thread Anuradha Ratnaweera

On Sun, Jun 24, 2001 at 01:33:51PM -0400, Horst von Brand wrote:
> Fabian Arias <[EMAIL PROTECTED]> said:
> 
> What gcc objects to is stuff like:
> 
>"This is a nice long string
> that just goes on
> and on\n"
> 
> which is illegal in C AFAIU. It does not object to:
> 
>"This long string"
>"spans several lines, "
>"but legally.\n"

Agreed. I was incorrectly guessing that the it was the latter.

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

Don't look now, but the man in the moon is laughing at you.

-
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/



[PATCH] GCC v3 warning fixes #1 (Was: Re: 2.4.5 and gcc v3 final)

2001-06-26 Thread Anuradha Ratnaweera

On Sun, Jun 24, 2001 at 01:33:51PM -0400, Horst von Brand wrote:
> 
> What gcc objects to is stuff like:
> 
>"This is a nice long string
> that just goes on
> and on\n"
> 
> which is illegal in C AFAIU. It does not object to:
> 
>"This long string"
>"spans several lines, "
>"but legally.\n"
> 
> The first form does/did appear in several asm()s. Fix them, send a patch.

Here is the first patch, which will fix warnings on many drivers. It is not
tested. But most, if not all, changes should be obvious.

I have tried to keep the coding style as closely as possible to the surronding
code.

Cheers,

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

Reality is just a crutch for people who can't handle science fiction.




diff -u --recursive --new-file linux-2.4.6-pre5/drivers/atm/iphase.c 
linux/drivers/atm/iphase.c
--- linux-2.4.6-pre5/drivers/atm/iphase.c   Mon Jun 25 23:50:30 2001
+++ linux/drivers/atm/iphase.c  Tue Jun 26 00:41:28 2001
@@ -203,8 +203,8 @@
 ltimeout = dev->desc_tbl[i].iavcc->ltimeout; 
 delta = jiffies - dev->desc_tbl[i].timestamp;
 if (delta >= ltimeout) {
-   IF_ABR(printk("RECOVER run!! desc_tbl %d = %d  delta = %ld, 
-   time = %ld\n", i,dev->desc_tbl[i].timestamp, delta, jiffies);)
+   IF_ABR(printk("RECOVER run!! desc_tbl %d = %d  delta = %ld, time = %ld\n",
+  i,dev->desc_tbl[i].timestamp, delta, jiffies);)
if (dev->ffL.tcq_rd == dev->ffL.tcq_st) 
   dev->ffL.tcq_rd =  dev->ffL.tcq_ed;
else 
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/char/cyclades.c 
linux/drivers/char/cyclades.c
--- linux-2.4.6-pre5/drivers/char/cyclades.cMon Jun 25 23:50:08 2001
+++ linux/drivers/char/cyclades.c   Tue Jun 26 00:08:38 2001
@@ -3440,8 +3440,8 @@
}
 #ifdef CY_DEBUG_DTR
printk("cyc:set_line_char dropping DTR\n");
-   printk(" status: 0x%x,
-   0x%x\n", cy_readb(base_addr+(CyMSVR1len );
rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Control 0x%x 
(%d)\n", PacketP->control, PacketP->control);
rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Check 0x%x 
(%d)\n", PacketP->csum, PacketP->csum );
-   rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 
0x%x, 
-   Command Code 0x%x\n", PktCmdP->PhbNum, 
PktCmdP->Command );
+   rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 
+0x%x, Command Code 0x%x\n",
+PktCmdP->PhbNum, PktCmdP->Command );
return TRUE;
}
 
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/i2c/i2c-core.c 
linux/drivers/i2c/i2c-core.c
--- linux-2.4.6-pre5/drivers/i2c/i2c-core.c Mon Jun 25 23:50:31 2001
+++ linux/drivers/i2c/i2c-core.cTue Jun 26 00:42:55 2001
@@ -381,10 +381,10 @@
printk("i2c-core.o: while "
   "unregistering driver "
   "`%s', the client at "
-  "address %02x of
-  adapter `%s' could not
-  be detached; driver
-  not unloaded!",
+  "address %02x of "
+  "adapter `%s' could not "
+  "be detached; driver "
+  "not unloaded!",
   driver->name,
   client->addr,
   adap->name);
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/i2o/i2o_core.c 
linux/drivers/i2o/i2o_core.c
--- linux-2.4.6-pre5/drivers/i2o/i2o_core.c Mon Jun 25 23:50:30 2001
+++ linux/drivers/i2o/i2o_core.cTue Jun 26 00:39:38 2001
@@ -3319,8 +3319,8 @@
{
if(i2o_quiesce_controller(c))
{
-   printk(KERN_WARNING "i2o: Could not quiesce %s."  "
-   Verify setup on next system power up.\n", c->name);
+   printk(KERN_WARNING "i2o: Could not quiesce %s."
+   "  Verify setup on next system power up.\n", c->name);
}
}
 
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/net/pcmcia/fmvj18x_cs.c 
linux/drivers/net/pcmcia/fmvj18x_cs.c
--- linux-2.4.6-pre5/drivers/net/pcmcia/fmvj18x_cs.cMon Jun 25 23:50:06 2001
+++ linux/drivers/net/pcmcia/fmvj18x_cs.c   Tue Jun 26 00:13:06 2001
@@ -

Re: 2.4.5 and gcc v3 final

2001-06-25 Thread Andreas Bombe

On Sun, Jun 24, 2001 at 01:33:51PM -0400, Horst von Brand wrote:
> What gcc objects to is stuff like:
> 
>"This is a nice long string
> that just goes on
> and on\n"
> 
> which is illegal in C AFAIU. It does not object to:
> 
>"This long string"
>"spans several lines, "
>"but legally.\n"

But the first example contains three newlines, the second just one.  A
thing to keep in mind when going around fixing these multi line strings,
explicit newlines have to be added.

-- 
Andreas E. Bombe <[EMAIL PROTECTED]>DSA key 0x04880A44
-
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/



Re: 2.4.5 and gcc v3 final

2001-06-25 Thread Horst von Brand

Fabian Arias <[EMAIL PROTECTED]> said:
> On Sun, 24 Jun 2001, Anuradha Ratnaweera wrote:
> > On Fri, Jun 22, 2001 at 10:29:25AM +0400, Anatoly Ivanov wrote:
> > > I hope that lk-developers would fix it one day.

> > Multi-string literals is a nice little ANSI C feature that appears
> > everywhere.  Why it is necessary to "fix" them?

> I think that "fix" doesn't necesary mean "kill" the feature.
> But is a problem that some of us, compiling the ac series with gcc-3, have
> had. 

What gcc objects to is stuff like:

   "This is a nice long string
that just goes on
and on\n"

which is illegal in C AFAIU. It does not object to:

   "This long string"
   "spans several lines, "
   "but legally.\n"

The first form does/did appear in several asm()s. Fix them, send a patch.
-- 
Horst von Brand [EMAIL PROTECTED]
Casilla 9G, Vin~a del Mar, Chile   +56 32 672616
-
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/



Re: 2.4.5 and gcc v3 final

2001-06-24 Thread Fabian Arias



On Sun, 24 Jun 2001, Anuradha Ratnaweera wrote:

> On Fri, Jun 22, 2001 at 10:29:25AM +0400, Anatoly Ivanov wrote:
> > 
> > I hope that lk-developers would fix it one day.
> 
> Multi-string literals is a nice little ANSI C feature that appears everywhere.
> Why it is necessary to "fix" them?

I think that "fix" doesn't necesary mean "kill" the feature.
But is a problem that some of us, compiling the ac series with gcc-3, have
had. 

PD: My syntaxis of english should be "deprecated", jeje

> 
> Anuradha
> 
> -- 
> 
> Debian GNU/Linux (kernel 2.4.6-pre5)
> 
> For some reason a glaze passes over people's faces when you say
> "Canada".  Maybe we should invade South Dakota or something.
>   -- Sandra Gotlieb, wife of the Canadian ambassador to the U.S.
> 
> -
> 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/
> 

 ---
 Fabian Arias Mu~oz|   Debian GNU/Linux Sid
 Facultad de Cs. Economicas y  |Kernel 2.4.5ac17 - ReiserFS
 Administrativas.  |   "aka" dewback en
 Universidad de Concepcion   -  Chile  |   #linuxhelp IRC.CHILE

-
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/



Re: 2.4.5 and gcc v3 final

2001-06-23 Thread Anuradha Ratnaweera

On Fri, Jun 22, 2001 at 10:29:25AM +0400, Anatoly Ivanov wrote:
> 
> I hope that lk-developers would fix it one day.

Multi-string literals is a nice little ANSI C feature that appears everywhere.
Why it is necessary to "fix" them?

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

For some reason a glaze passes over people's faces when you say
"Canada".  Maybe we should invade South Dakota or something.
-- Sandra Gotlieb, wife of the Canadian ambassador to the U.S.

-
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/



Re: 2.4.5 and gcc v3 final

2001-06-21 Thread Anatoly Ivanov

As you can see, this is just deprecation warning,
i.e. you can use multi-string literals, but
you'd better don't.

You can forget about these warnings and test ac17
with gcc3.

I hope that lk-developers would fix it one day.

---
avi

Fabian Arias wrote:

> I've just applied the "patch", but te warning still appears. Is this
> somthing not to be worried about or is it something serious?
> 
> /usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
> string literals are deprecated
> 
> I had to come back to 2.95 to test the ac17. Not so happy about it. :(
> 
> Please give me some directions.
> 
> On Wed, 20 Jun 2001, Anatoly Ivanov wrote:
> 


-
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/



Re: 2.4.5 and gcc v3 final

2001-06-21 Thread Fabian Arias


I've just applied the "patch", but te warning still appears. Is this
somthing not to be worried about or is it something serious?

/usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
string literals are deprecated

I had to come back to 2.95 to test the ac17. Not so happy about it. :(

Please give me some directions.

On Wed, 20 Jun 2001, Anatoly Ivanov wrote:

> Hi,
> 
> Solution is simple:
> change line 540 from "extern struct timeval xtime;"
> to "extern volatile struct timeval xtime;"
> and have fun :)
> 
> ---
> avi
> 
> Kissandrakis S. George wrote:
> 
> > Hello
> > I suppose that you allready know it
> > I have installed gcc v3 released Jun 18 and i tried to compile the
> > kernel and i got
> > these errors
> > 
> > in make dep i got several warnings that look like this
> > 
> > /usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
> > string literals are deprecated
> > 
> > but finally passed..
> > 
> > in make bzImage i got
> > 
> > timer.c:35: conflicting types for `xtime'
> > /usr/src/linux-2.4.5/include/linux/sched.h:540: previous declaration of
> > `xtime'
> > 
> > and compilation stops
> > if i remove the decleration of xtime in sched.h (remove the 540 line)
> > the compile
> > will go on and some compiles after...
> > 
> > time.c: In function `do_normal_gettime':
> > time.c:41: `xtime' undeclared (first use in this function)
> > 
> > and some other errors
> > if in time.c include the line 540 from sched.h (the xtime) the
> > compilation will go on
> > until the same error on another file
> > i include again the line 540 from sched.h the compilation goes on etc
> > etc and after lots
> > of errors finally i got bzImage
> > 
> > I didnt test bzImage if it boots 
> > 
> > with gcc v2.x the same kernel and kernel config it compiles,Is it a
> > kernel bug, a gcc
> > bug or something else (bad installation of gcc, my mistake etc etc)? 
> > 
> > Best Regards
> > 
> > 
> > --- 
> > Kissandrakis S. George [[EMAIL PROTECTED]]
> > Network and System Administrator   [http://www.phaistosnetworks.gr/]
> > Tel:(+30 81) 391882/Fax:(+30 892) 23206
> > Phaistos Networks S.A. - A DOL Digital Company
> > -
> > 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/
> > 
> 
> 
> 
> -
> 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/
> 

 ---
 Fabian Arias Mu~oz|   Debian GNU/Linux Sid
 Facultad de Cs. Economicas y  |Kernel 2.4.5ac16 - ReiserFS
 Administrativas.  |   "aka" dewback en
 Universidad de Concepcion   -  Chile  |   #linuxhelp IRC.CHILE

-
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/



Re: 2.4.5 and gcc v3 final

2001-06-20 Thread Anatoly Ivanov

Hi,

Solution is simple:
change line 540 from "extern struct timeval xtime;"
to "extern volatile struct timeval xtime;"
and have fun :)

---
avi

Kissandrakis S. George wrote:

> Hello
> I suppose that you allready know it
> I have installed gcc v3 released Jun 18 and i tried to compile the
> kernel and i got
> these errors
> 
> in make dep i got several warnings that look like this
> 
> /usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
> string literals are deprecated
> 
> but finally passed..
> 
> in make bzImage i got
> 
> timer.c:35: conflicting types for `xtime'
> /usr/src/linux-2.4.5/include/linux/sched.h:540: previous declaration of
> `xtime'
> 
> and compilation stops
> if i remove the decleration of xtime in sched.h (remove the 540 line)
> the compile
> will go on and some compiles after...
> 
> time.c: In function `do_normal_gettime':
> time.c:41: `xtime' undeclared (first use in this function)
> 
> and some other errors
> if in time.c include the line 540 from sched.h (the xtime) the
> compilation will go on
> until the same error on another file
> i include again the line 540 from sched.h the compilation goes on etc
> etc and after lots
> of errors finally i got bzImage
> 
> I didnt test bzImage if it boots 
> 
> with gcc v2.x the same kernel and kernel config it compiles,Is it a
> kernel bug, a gcc
> bug or something else (bad installation of gcc, my mistake etc etc)? 
> 
> Best Regards
> 
> 
> --- 
> Kissandrakis S. George [[EMAIL PROTECTED]]
> Network and System Administrator   [http://www.phaistosnetworks.gr/]
> Tel:(+30 81) 391882/Fax:(+30 892) 23206
> Phaistos Networks S.A. - A DOL Digital Company
> -
> 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/
> 



-
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/



2.4.5 and gcc v3 final

2001-06-20 Thread Kissandrakis S. George

Hello
I suppose that you allready know it
I have installed gcc v3 released Jun 18 and i tried to compile the
kernel and i got
these errors

in make dep i got several warnings that look like this

/usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
string literals are deprecated

but finally passed..

in make bzImage i got

timer.c:35: conflicting types for `xtime'
/usr/src/linux-2.4.5/include/linux/sched.h:540: previous declaration of
`xtime'

and compilation stops
if i remove the decleration of xtime in sched.h (remove the 540 line)
the compile
will go on and some compiles after...

time.c: In function `do_normal_gettime':
time.c:41: `xtime' undeclared (first use in this function)

and some other errors
if in time.c include the line 540 from sched.h (the xtime) the
compilation will go on
until the same error on another file
i include again the line 540 from sched.h the compilation goes on etc
etc and after lots
of errors finally i got bzImage

I didnt test bzImage if it boots 

with gcc v2.x the same kernel and kernel config it compiles,Is it a
kernel bug, a gcc
bug or something else (bad installation of gcc, my mistake etc etc)? 

Best Regards


--- 
Kissandrakis S. George [[EMAIL PROTECTED]]
Network and System Administrator   [http://www.phaistosnetworks.gr/]
Tel:(+30 81) 391882/Fax:(+30 892) 23206
Phaistos Networks S.A. - A DOL Digital Company
-
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/