linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* C99 Initialisers
@ 2003-08-12  2:02 CaT
  2003-08-12  2:18 ` Robert Love
  0 siblings, 1 reply; 71+ messages in thread
From: CaT @ 2003-08-12  2:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel-janitor-discuss

Is there any interest ins omeone 'fixing up' as many structs in the
kernel from the form:

struct foobar = {
	cow:	moo,
	cat:	meow,
}

to:

struct foobar = {
	.cow	= moo,
	.cat	= neow,
}

And if so, what form should I feed it back in? Big patches? 1 patch
per file? 1 per dir?

Main reaosn I'm asking is that it's slowly being done but isn't in
the janitor list of things to do yet. If it were I'd just do it. ;)

(not on kj-discuss btw so please CC me or lk (or both))

-- 
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
	- http://tinyurl.com/h6fo

^ permalink raw reply	[flat|nested] 71+ messages in thread
* RE: C99 Initialisers
@ 2003-08-12 16:52 Shureih, Tariq
  0 siblings, 0 replies; 71+ messages in thread
From: Shureih, Tariq @ 2003-08-12 16:52 UTC (permalink / raw)
  To: Matthew Wilcox, Greg KH
  Cc: Robert Love, CaT, linux-kernel, kernel-janitor-discuss

I personally see a difference and an advantage in making it easier to
read therefore easier to manage and maintain.

Sure it's a whole conversion process and may be a bit shocking to
existing drivers and people used to the struct in this format, but
that's nothing new to the kernel to yank something we're all so used to
and replace it with something that we would all benefit from in the long
term.


--
Tariq Shureih
 

*Opinions are my own and don't reflect those of my employer*
*But my two cents and what's left of my stock options :P*

> -----Original Message-----
> From: Matthew Wilcox [mailto:willy@debian.org]
> Sent: Tuesday, August 12, 2003 4:27 AM
> To: Greg KH
> Cc: Matthew Wilcox; Robert Love; CaT; linux-kernel@vger.kernel.org;
> kernel-janitor-discuss@lists.sourceforge.net
> Subject: Re: C99 Initialisers
> 
> On Mon, Aug 11, 2003 at 10:38:27PM -0700, Greg KH wrote:
> > On Tue, Aug 12, 2003 at 03:39:36AM +0100, Matthew Wilcox wrote:
> > > I don't think anyone would appreciate you converting that to:
> > >
> > > static struct pci_device_id tg3_pci_tbl[] __devinitdata = {
> > > 	{
> > > 		.vendor		= PCI_VENDOR_ID_BROADCOM,
> > > 		.device		= PCI_DEVICE_ID_TIGON3_5700,
> > > 		.subvendor	= PCI_ANY_ID,
> > > 		.subdevice	= PCI_ANY_ID,
> > > 		.class		= 0,
> > > 		.class_mask	= 0,
> > > 		.driver_data	= 0,
> > > 	},
> >
> > I sure would.  Oh, you can drop the .class, .class_mask, and
> > .driver_data lines, and then it even looks cleaner.
> >
> > I would love to see that kind of change made for pci drivers.
> 
> I really strongly disagree.  For a struct that's as well-known as
> pci_device_id, the argument of making it clearer doesn't make sense.
> It's also not subject to change, unlike say file_operations, so the
> argument of adding new elements without breaking anything is also not
> relevant.
> 
> In tg3, the table definition is already 32 lines long with 2 lines per
> device_id.  In the scheme you favour so much, that becomes 92 lines,
for
> no real gain that I can see.
> 
> --
> "It's not Hollywood.  War is real, war is primarily not about defeat
or
> victory, it is about death.  I've seen thousands and thousands of dead
> bodies.
> Do you think I want to have an academic debate on this subject?" --
Robert
> Fisk
> -
> 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] 71+ messages in thread
[parent not found: <jFFu.7t8.15@gated-at.bofh.it>]

end of thread, other threads:[~2003-08-15 18:05 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12  2:02 C99 Initialisers CaT
2003-08-12  2:18 ` Robert Love
2003-08-12  2:39   ` Matthew Wilcox
2003-08-12  2:45     ` Robert Love
2003-08-12  2:57     ` Dagfinn Ilmari Mannsåker
2003-08-12  5:38     ` Greg KH
2003-08-12  9:01       ` Maciej Soltysiak
2003-08-12 10:03         ` Geert Uytterhoeven
2003-08-12 10:19           ` Jakub Jelinek
2003-08-12 11:27       ` Matthew Wilcox
2003-08-12 16:54         ` Ian Hastie
2003-08-12 18:01         ` Greg KH
2003-08-12 23:53           ` Dave Jones
2003-08-13  0:08             ` Matthew Wilcox
2003-08-13  0:23               ` Greg KH
2003-08-13  0:31                 ` Matthew Wilcox
2003-08-14  5:45               ` H. Peter Anvin
2003-08-13 15:52             ` Timothy Miller
2003-08-13 17:50               ` Jeff Garzik
2003-08-13  0:02           ` Jeff Garzik
2003-08-13  0:14             ` Randy.Dunlap
2003-08-13  0:31               ` Jeff Garzik
2003-08-13  0:37                 ` Randy.Dunlap
2003-08-13  0:49                   ` Dave Jones
2003-08-13  1:25                     ` Jeff Garzik
2003-08-13  3:02                     ` Randy.Dunlap
2003-08-13  3:26                       ` Jeff Garzik
2003-08-13 10:14                         ` David S. Miller
2003-08-13 17:31                           ` Greg KH
2003-08-13 17:36                             ` David S. Miller
2003-08-13 17:47                             ` Jeff Garzik
2003-08-13 18:02                               ` Greg KH
2003-08-13 18:26                                 ` Jeff Garzik
2003-08-13 18:38                                   ` Russell King
2003-08-13 19:44                                     ` Jeff Garzik
2003-08-13 19:54                                       ` Matthew Wilcox
2003-08-13 20:15                                         ` Greg KH
2003-08-13 20:16                                         ` Dave Jones
2003-08-13 20:30                                           ` Matt Domsch
2003-08-13 20:29                                         ` Jeff Garzik
2003-08-13 21:05                                           ` Sam Ravnborg
2003-08-13 22:24                                             ` Roman Zippel
2003-08-14 20:31                                               ` Sam Ravnborg
2003-08-14 10:05                                           ` Geert Uytterhoeven
2003-08-14 10:25                                             ` Gene Heskett
2003-08-14 10:52                                             ` jw schultz
2003-08-14 12:34                                               ` Geert Uytterhoeven
2003-08-14 12:57                                             ` Andrey Panin
2003-08-14 18:45                                             ` H. Peter Anvin
2003-08-13 21:06                                       ` Russell King
2003-08-13 21:17                                       ` Eduardo Pereira Habkost
2003-08-13 17:50                             ` Sam Ravnborg
2003-08-13 17:54                               ` Jeff Garzik
2003-08-13 17:54                               ` Matthew Wilcox
2003-08-13 17:58                                 ` Jeff Garzik
2003-08-13 18:03                                 ` Greg KH
2003-08-13 17:58                               ` Greg KH
2003-08-13 18:21                                 ` Sam Ravnborg
2003-08-13 18:09                               ` Russell King
2003-08-13 20:21                             ` Krzysztof Halasa
2003-08-13 21:17                               ` David S. Miller
2003-08-13 21:26                               ` Greg KH
2003-08-14 22:46                                 ` Krzysztof Halasa
2003-08-12 17:37     ` Dave Jones
2003-08-12 17:48       ` Matthew Wilcox
2003-08-12 22:06         ` Ian Hastie
2003-08-13 15:54   ` CaT
2003-08-14  6:57     ` Maciej Soltysiak
2003-08-12 16:52 Shureih, Tariq
     [not found] <jFFu.7t8.15@gated-at.bofh.it>
     [not found] ` <jLKX.4KI.13@gated-at.bofh.it>
     [not found]   ` <jRnj.2dx.11@gated-at.bofh.it>
     [not found]     ` <jRwZ.2kJ.15@gated-at.bofh.it>
     [not found]       ` <jRQi.2zQ.5@gated-at.bofh.it>
     [not found]         ` <jRZY.2Hw.5@gated-at.bofh.it>
     [not found]           ` <jS9J.2Np.5@gated-at.bofh.it>
     [not found]             ` <jUbt.57S.7@gated-at.bofh.it>
     [not found]               ` <jUuT.5kZ.13@gated-at.bofh.it>
     [not found]                 ` <k13k.22O.3@gated-at.bofh.it>
     [not found]                   ` <k7Lq.7Gr.7@gated-at.bofh.it>
2003-08-13 21:19                     ` junkio
2003-08-13 22:18                       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).