* [Coding style question] XXX_register or register_XXX
@ 2002-11-20 23:49 Rusty Lynch
2002-11-20 19:02 ` Halil Demirezen
2002-11-21 1:08 ` Robert Love
0 siblings, 2 replies; 5+ messages in thread
From: Rusty Lynch @ 2002-11-20 23:49 UTC (permalink / raw)
To: linux-kernel
Is there an accepted standard on naming for registration functions? If have
a foo
object that other things can register and unregister with, should the
function names be:
int register_foo(&something);
int unregister_foo(&something);
- or -
int foo_register(&something);
int foo_unregister(&something);
-rustyl
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Coding style question] XXX_register or register_XXX
2002-11-20 23:49 [Coding style question] XXX_register or register_XXX Rusty Lynch
@ 2002-11-20 19:02 ` Halil Demirezen
2002-11-21 1:08 ` Robert Love
1 sibling, 0 replies; 5+ messages in thread
From: Halil Demirezen @ 2002-11-20 19:02 UTC (permalink / raw)
To: Rusty Lynch; +Cc: linux-kernel
> Is there an accepted standard on naming for registration functions?
> If have a foo object that other things can register and unregister
> with, should the function names be:
> int foo_register(&something);
> int foo_unregister(&something);
really, that would make the entire kernel code a little
simplier to understand.
On the same way, we can say why there is not an accepted standard on
naming lock functions, such as
spinlock, rwlock and so on..
That would be more efficient to understand the code...
However, where is flexibility?
-hd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Coding style question] XXX_register or register_XXX
2002-11-20 23:49 [Coding style question] XXX_register or register_XXX Rusty Lynch
2002-11-20 19:02 ` Halil Demirezen
@ 2002-11-21 1:08 ` Robert Love
2002-11-21 1:14 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 5+ messages in thread
From: Robert Love @ 2002-11-21 1:08 UTC (permalink / raw)
To: Rusty Lynch; +Cc: linux-kernel
On Wed, 2002-11-20 at 18:49, Rusty Lynch wrote:
> Is there an accepted standard on naming for registration functions? If have
> a foo object that other things can register and unregister with,
> should the function names be:
I do not think there is an accepted practice here.
> int register_foo(&something);
> int unregister_foo(&something);
I bet this is more common.
> int foo_register(&something);
> int foo_unregister(&something);
But I prefer this - I like there to be a namespace for a given subsystem
and for it to be a prefix.
Robert Love
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Coding style question] XXX_register or register_XXX
2002-11-21 1:08 ` Robert Love
@ 2002-11-21 1:14 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-11-21 1:14 UTC (permalink / raw)
To: Robert Love; +Cc: Rusty Lynch, linux-kernel
Em Wed, Nov 20, 2002 at 08:08:28PM -0500, Robert Love escreveu:
> On Wed, 2002-11-20 at 18:49, Rusty Lynch wrote:
> > int foo_register(&something);
> > int foo_unregister(&something);
> But I prefer this - I like there to be a namespace for a given subsystem
> and for it to be a prefix.
100% agreed. Just look at LLC 8) And yes, the big names was procom's fault,
but the way it is structured... I'd love somebody to come up with something
that makes it smaller 8)
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Coding style question] XXX_register or register_XXX
@ 2002-11-21 3:53 Perez-Gonzalez, Inaky
0 siblings, 0 replies; 5+ messages in thread
From: Perez-Gonzalez, Inaky @ 2002-11-21 3:53 UTC (permalink / raw)
To: 'Rusty Lynch', linux-kernel
> int foo_register(&something);
> int foo_unregister(&something);
I prefer this, althought the other one is [maybe more] common.
Inaky Perez-Gonzalez -- Not speaking for Intel - opinions are my own [or my
fault]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-21 3:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20 23:49 [Coding style question] XXX_register or register_XXX Rusty Lynch
2002-11-20 19:02 ` Halil Demirezen
2002-11-21 1:08 ` Robert Love
2002-11-21 1:14 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2002-11-21 3:53 Perez-Gonzalez, Inaky
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.