* Remain Calm: Designated initializer patches for 2.5
@ 2002-07-18 3:22 Rusty Russell
2002-07-18 3:32 ` Arnaldo Carvalho de Melo
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Rusty Russell @ 2002-07-18 3:22 UTC (permalink / raw)
To: linux-kernel
Cc: viro, trond.myklebust, Matija Nalis, aia21, al, asun, bfennema,
dave, braam, chaffee, dwmw2, eric, hch, hpa, jaharkes, jakub,
jffs-dev, mikulas, quinlan, reiserfs-dev, Chris Mason, rgooch,
rmk, shaggy, tigran, urban, vandrove, vl, zippel, Art Haas
Hi all,
I just sent about 40 reasonable-size patches through the
Trivial Patch Monkey to Linus: these patches replace the (deprecated)
"foo: " designated initializers with the ISO-C ".foo =" initializers.
GCC has understood both since forever, but the kernel took a wrong
bet, and we're better off setting a good example for 2.6 before we
start getting about 10,000 warnings.
So far, Art Haas has done all the fs code, and will presumably
be working through the other code on dir at a time.
Just a heads-up,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 3:22 Remain Calm: Designated initializer patches for 2.5 Rusty Russell
@ 2002-07-18 3:32 ` Arnaldo Carvalho de Melo
2002-07-18 7:42 ` Rusty Russell
2002-07-18 6:32 ` H. Peter Anvin
2002-07-18 13:47 ` Daniel Phillips
2 siblings, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-07-18 3:32 UTC (permalink / raw)
To: Rusty Russell
Cc: linux-kernel, viro, trond.myklebust, Matija Nalis, aia21, al,
asun, bfennema, dave, braam, chaffee, dwmw2, eric, hch, hpa,
jaharkes, jakub, jffs-dev, mikulas, quinlan, reiserfs-dev,
Chris Mason, rgooch, rmk, shaggy, tigran, urban, vandrove, vl,
zippel, Art Haas
Em Thu, Jul 18, 2002 at 01:22:23PM +1000, Rusty Russell escreveu:
> Hi all,
>
> I just sent about 40 reasonable-size patches through the
> Trivial Patch Monkey to Linus: these patches replace the (deprecated)
> "foo: " designated initializers with the ISO-C ".foo =" initializers.
> GCC has understood both since forever, but the kernel took a wrong
> bet, and we're better off setting a good example for 2.6 before we
> start getting about 10,000 warnings.
>
> So far, Art Haas has done all the fs code, and will presumably
> be working through the other code on dir at a time.
>
> Just a heads-up,
Did this ones touched the net/{ipv4,ipv6,appletalk} dirs? I'm working on
general cleanups in those and this is one of the things I'm doing, again
just a heads up.
- Arnaldo
PS.: deliver_to_old_ones_users-- will happen for Appletalk 8)
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 3:32 ` Arnaldo Carvalho de Melo
@ 2002-07-18 7:42 ` Rusty Russell
0 siblings, 0 replies; 14+ messages in thread
From: Rusty Russell @ 2002-07-18 7:42 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Art Haas
In message <20020718033243.GA2031@conectiva.com.br> you write:
> Did this ones touched the net/{ipv4,ipv6,appletalk} dirs? I'm working on
> general cleanups in those and this is one of the things I'm doing, again
> just a heads up.
Not yet, but if you get in first, Art won't have to.
Cheers!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 3:22 Remain Calm: Designated initializer patches for 2.5 Rusty Russell
2002-07-18 3:32 ` Arnaldo Carvalho de Melo
@ 2002-07-18 6:32 ` H. Peter Anvin
2002-07-18 6:28 ` David S. Miller
2002-07-18 7:46 ` Rusty Russell
2002-07-18 13:47 ` Daniel Phillips
2 siblings, 2 replies; 14+ messages in thread
From: H. Peter Anvin @ 2002-07-18 6:32 UTC (permalink / raw)
To: Rusty Russell
Cc: linux-kernel, viro, trond.myklebust, Matija Nalis, aia21, al,
asun, bfennema, dave, braam, chaffee, dwmw2, eric, hch, jaharkes,
jakub, jffs-dev, mikulas, quinlan, reiserfs-dev, Chris Mason,
rgooch, rmk, shaggy, tigran, urban, vandrove, vl, zippel,
Art Haas
Rusty Russell wrote:
> Hi all,
>
> I just sent about 40 reasonable-size patches through the
> Trivial Patch Monkey to Linus: these patches replace the (deprecated)
> "foo: " designated initializers with the ISO-C ".foo =" initializers.
> GCC has understood both since forever, but the kernel took a wrong
> bet, and we're better off setting a good example for 2.6 before we
> start getting about 10,000 warnings.
>
> So far, Art Haas has done all the fs code, and will presumably
> be working through the other code on dir at a time.
>
As far as I could tell, *ALL* of these changes broke text alignment in
columns. It would have been a lot better if they had maintained
spacing; I find the new code much more cluttered and hard to read.
-hpa
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 6:32 ` H. Peter Anvin
@ 2002-07-18 6:28 ` David S. Miller
2002-07-18 6:40 ` H. Peter Anvin
2002-07-18 6:53 ` Arnaldo Carvalho de Melo
2002-07-18 7:46 ` Rusty Russell
1 sibling, 2 replies; 14+ messages in thread
From: David S. Miller @ 2002-07-18 6:28 UTC (permalink / raw)
To: hpa
Cc: rusty, linux-kernel, viro, trond.myklebust, mnalis-umsdos, aia21,
al, asun, bfennema, dave, braam, chaffee, dwmw2, eric, hch,
jaharkes, jakub, jffs-dev, mikulas, quinlan, reiserfs-dev, mason,
rgooch, rmk, shaggy, tigran, urban, vandrove, vl, zippel, ahaas
From: "H. Peter Anvin" <hpa@zytor.com>
Date: Wed, 17 Jul 2002 23:32:35 -0700
As far as I could tell, *ALL* of these changes broke text alignment in
columns. It would have been a lot better if they had maintained
spacing; I find the new code much more cluttered and hard to read.
I have to admit that I hate the new syntax too. The GCC syntax is
so much nicer.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 6:28 ` David S. Miller
@ 2002-07-18 6:40 ` H. Peter Anvin
2002-07-18 6:53 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 14+ messages in thread
From: H. Peter Anvin @ 2002-07-18 6:40 UTC (permalink / raw)
To: David S. Miller
Cc: rusty, linux-kernel, viro, trond.myklebust, mnalis-umsdos, aia21,
al, asun, bfennema, dave, braam, chaffee, dwmw2, eric, hch,
jaharkes, jakub, jffs-dev, mikulas, quinlan, reiserfs-dev, mason,
rgooch, rmk, shaggy, tigran, urban, vandrove, vl, zippel, ahaas
David S. Miller wrote:
> From: "H. Peter Anvin" <hpa@zytor.com>
> Date: Wed, 17 Jul 2002 23:32:35 -0700
>
> As far as I could tell, *ALL* of these changes broke text alignment in
> columns. It would have been a lot better if they had maintained
> spacing; I find the new code much more cluttered and hard to read.
>
> I have to admit that I hate the new syntax too. The GCC syntax is
> so much nicer.
The C99 syntax actually has some advantages (I believe it lets you
initialize array elements in a saner way), but my complaint had to do
with the fact that whitespace for alignment wasn't preserved.
-hpa
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 6:28 ` David S. Miller
2002-07-18 6:40 ` H. Peter Anvin
@ 2002-07-18 6:53 ` Arnaldo Carvalho de Melo
2002-07-18 6:56 ` H. Peter Anvin
1 sibling, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-07-18 6:53 UTC (permalink / raw)
To: David S. Miller
Cc: hpa, rusty, linux-kernel, viro, trond.myklebust, mnalis-umsdos,
aia21, al, asun, bfennema, dave, braam, chaffee, dwmw2, eric, hch,
jaharkes, jakub, jffs-dev, mikulas, quinlan, reiserfs-dev, mason,
rgooch, rmk, shaggy, tigran, urban, vandrove, vl, zippel, ahaas
Em Wed, Jul 17, 2002 at 11:28:32PM -0700, David S. Miller escreveu:
> From: "H. Peter Anvin" <hpa@zytor.com>
> Date: Wed, 17 Jul 2002 23:32:35 -0700
>
> As far as I could tell, *ALL* of these changes broke text alignment in
> columns. It would have been a lot better if they had maintained
> spacing; I find the new code much more cluttered and hard to read.
>
> I have to admit that I hate the new syntax too. The GCC syntax is
> so much nicer.
Well, I also like the non C99 variant that is in gcc as well, but if gcc is
going to drop that in the future in favour of the C99 standard... But yes,
not having the spacing is _ugly_, what I'm doing is:
static struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = {
.family = PF_APPLETALK,
.release = atalk_release,
.bind = atalk_bind,
.connect = atalk_connect,
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.
.
.
8)
- Arnaldo
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 6:53 ` Arnaldo Carvalho de Melo
@ 2002-07-18 6:56 ` H. Peter Anvin
2002-07-18 7:33 ` Anton Altaparmakov
0 siblings, 1 reply; 14+ messages in thread
From: H. Peter Anvin @ 2002-07-18 6:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: David S. Miller, rusty, linux-kernel, viro, trond.myklebust,
mnalis-umsdos, aia21, al, asun, bfennema, dave, braam, chaffee,
dwmw2, eric, hch, jaharkes, jakub, jffs-dev, mikulas, quinlan,
reiserfs-dev, mason, rgooch, rmk, shaggy, tigran, urban, vandrove,
vl, zippel, ahaas
Arnaldo Carvalho de Melo wrote:
>
> Well, I also like the non C99 variant that is in gcc as well, but if gcc is
> going to drop that in the future in favour of the C99 standard... But yes,
> not having the spacing is _ugly_, what I'm doing is:
>
> static struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = {
> .family = PF_APPLETALK,
> .release = atalk_release,
> .bind = atalk_bind,
> .connect = atalk_connect,
> .socketpair = sock_no_socketpair,
> .accept = sock_no_accept,
Agreed, that's the way to do it.
-hpa
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 6:56 ` H. Peter Anvin
@ 2002-07-18 7:33 ` Anton Altaparmakov
0 siblings, 0 replies; 14+ messages in thread
From: Anton Altaparmakov @ 2002-07-18 7:33 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Arnaldo Carvalho de Melo, David S. Miller, rusty, linux-kernel,
viro, trond.myklebust, mnalis-umsdos, al, asun, bfennema, dave,
braam, chaffee, dwmw2, eric, hch, jaharkes, jakub, jffs-dev,
mikulas, quinlan, reiserfs-dev, mason, rgooch, rmk, shaggy,
tigran, urban, vandrove, vl, zippel, ahaas
At 07:56 18/07/02, H. Peter Anvin wrote:
>Arnaldo Carvalho de Melo wrote:
>>Well, I also like the non C99 variant that is in gcc as well, but if gcc is
>>going to drop that in the future in favour of the C99 standard... But yes,
>>not having the spacing is _ugly_, what I'm doing is:
>>static struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = {
>> .family = PF_APPLETALK,
>> .release = atalk_release,
>> .bind = atalk_bind,
>> .connect = atalk_connect,
>> .socketpair = sock_no_socketpair,
>> .accept = sock_no_accept,
>
>Agreed, that's the way to do it.
Yes, the patch for ntfs that just found its way into my inbox is _really_
ugly... Something like the above would be much nicer.
Anton
--
"I've not lost my mind. It's backed up on tape somewhere." - Unknown
--
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS Maintainer / IRC: #ntfs on irc.openprojects.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 6:32 ` H. Peter Anvin
2002-07-18 6:28 ` David S. Miller
@ 2002-07-18 7:46 ` Rusty Russell
2002-07-18 9:34 ` H. Peter Anvin
1 sibling, 1 reply; 14+ messages in thread
From: Rusty Russell @ 2002-07-18 7:46 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-kernel, Art Haas
In message <3D366103.8010403@zytor.com> you write:
> As far as I could tell, *ALL* of these changes broke text alignment in
> columns.
True.
> It would have been a lot better if they had maintained spacing; I
> find the new code much more cluttered and hard to read.
I thought about this: I agree it doesn't look as neat, but "hard to
read" for what purpose? It's just as easy to find a particular field
you're looking for and it's just as easy to find the end of the
declaration: I couldn't come up with a convincing argument for needing
to skim-read these declarations, so I didn't complain to the author.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 7:46 ` Rusty Russell
@ 2002-07-18 9:34 ` H. Peter Anvin
0 siblings, 0 replies; 14+ messages in thread
From: H. Peter Anvin @ 2002-07-18 9:34 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, Art Haas
Rusty Russell wrote:
> In message <3D366103.8010403@zytor.com> you write:
>
>>As far as I could tell, *ALL* of these changes broke text alignment in
>>columns.
>
>
> True.
>
>
>>It would have been a lot better if they had maintained spacing; I
>>find the new code much more cluttered and hard to read.
>
>
> I thought about this: I agree it doesn't look as neat, but "hard to
> read" for what purpose? It's just as easy to find a particular field
> you're looking for and it's just as easy to find the end of the
> declaration: I couldn't come up with a convincing argument for needing
> to skim-read these declarations, so I didn't complain to the author.
>
Neatness is about making it easy to read code *quickly*. The pattern
recognizer in your brain doesn't work as well on a jumbled mess.
-hpa
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 3:22 Remain Calm: Designated initializer patches for 2.5 Rusty Russell
2002-07-18 3:32 ` Arnaldo Carvalho de Melo
2002-07-18 6:32 ` H. Peter Anvin
@ 2002-07-18 13:47 ` Daniel Phillips
2002-07-19 1:32 ` Rusty Russell
2 siblings, 1 reply; 14+ messages in thread
From: Daniel Phillips @ 2002-07-18 13:47 UTC (permalink / raw)
To: Rusty Russell, linux-kernel
On Thursday 18 July 2002 05:22, Rusty Russell wrote:
> I just sent about 40 reasonable-size patches through the
> Trivial Patch Monkey to Linus: these patches replace the (deprecated)
> "foo: " designated initializers with the ISO-C ".foo =" initializers.
> GCC has understood both since forever, but the kernel took a wrong
> bet, and we're better off setting a good example for 2.6 before we
> start getting about 10,000 warnings.
Next time, remember to bet on the ugliest looking one ;-)
--
Daniel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-18 13:47 ` Daniel Phillips
@ 2002-07-19 1:32 ` Rusty Russell
2002-07-19 7:31 ` Marcin Dalecki
0 siblings, 1 reply; 14+ messages in thread
From: Rusty Russell @ 2002-07-19 1:32 UTC (permalink / raw)
To: Daniel Phillips; +Cc: linux-kernel
In message <E17VBcZ-0004oO-00@starship> you write:
> On Thursday 18 July 2002 05:22, Rusty Russell wrote:
> > GCC has understood both since forever, but the kernel took a wrong
> > bet, and we're better off setting a good example for 2.6 before we
> > start getting about 10,000 warnings.
>
> Next time, remember to bet on the ugliest looking one ;-)
I agreed, until I recently did a big grep to find these things. I now
concur with the C9X committee. ".foo = " is clearly distinguished
from bitfield declarations and labels, which "foo: " isn't.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Remain Calm: Designated initializer patches for 2.5
2002-07-19 1:32 ` Rusty Russell
@ 2002-07-19 7:31 ` Marcin Dalecki
0 siblings, 0 replies; 14+ messages in thread
From: Marcin Dalecki @ 2002-07-19 7:31 UTC (permalink / raw)
To: Rusty Russell; +Cc: Daniel Phillips, linux-kernel
Rusty Russell wrote:
> In message <E17VBcZ-0004oO-00@starship> you write:
>
>>On Thursday 18 July 2002 05:22, Rusty Russell wrote:
>>
>>>GCC has understood both since forever, but the kernel took a wrong
>>>bet, and we're better off setting a good example for 2.6 before we
>>>start getting about 10,000 warnings.
>>
>>Next time, remember to bet on the ugliest looking one ;-)
>
>
> I agreed, until I recently did a big grep to find these things. I now
> concur with the C9X committee. ".foo = " is clearly distinguished
> from bitfield declarations and labels, which "foo: " isn't.
Of hand I think about the following *technical* points:
1. It resembles the usage case similar to other initalizations.
2. It makes for less reduce/reduce conflicts in the LR-grammar
parser generator.
Its better and more outtought then the GNU "extension".
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2002-07-19 7:33 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-18 3:22 Remain Calm: Designated initializer patches for 2.5 Rusty Russell
2002-07-18 3:32 ` Arnaldo Carvalho de Melo
2002-07-18 7:42 ` Rusty Russell
2002-07-18 6:32 ` H. Peter Anvin
2002-07-18 6:28 ` David S. Miller
2002-07-18 6:40 ` H. Peter Anvin
2002-07-18 6:53 ` Arnaldo Carvalho de Melo
2002-07-18 6:56 ` H. Peter Anvin
2002-07-18 7:33 ` Anton Altaparmakov
2002-07-18 7:46 ` Rusty Russell
2002-07-18 9:34 ` H. Peter Anvin
2002-07-18 13:47 ` Daniel Phillips
2002-07-19 1:32 ` Rusty Russell
2002-07-19 7:31 ` Marcin Dalecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox