From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] document network driver framework
Date: Tue, 21 Jul 2009 13:55:34 -0700 [thread overview]
Message-ID: <4A662B46.5020701@gmail.com> (raw)
In-Reply-To: <200907211638.16437.vapier@gentoo.org>
Mike Frysinger wrote:
> On Tuesday 21 July 2009 03:32:55 Wolfgang Denk wrote:
>
>> Mike Frysinger wrote:
>>
>>>> Is this a generally-accepted naming convention? I personally think
>>>> it's crap, and since there isn't a single driver that uses it yet, you
>>>> might say this is a bit ahead of the curve.
>>>>
>>> some style needed to be suggested, and what Jean proposed is better than
>>> what we have today (which is nothing)
>>>
>> Arent't we pretty much doing what Linux is doing here, too? I see lots
>> of XXX_init functions in the Linux network code, for example.
>>
>>
>>> that's why i said "should", deprecated current naming, and noted existing
>>> practice. if you agree with the proposal, it's easy enough to run sed on
>>> a few files to fix one function name. you agree with my comment that
>>> today's behavior is confusing even if you stare and bang on the code day
>>> in and day out ? it's even worse for the occasional observer ...
>>>
>> Hm... renaming something from "xxx_init()" into "xxx_register()"
>> because other code is also also using "xxx_init()" does not really
>> make anything clearer to me. Actually IMO it just adds confusion,
>> because if other's use "xxx_init()" I'd expect from a consistence
>> point of view that we use "xxx_init()", too.
>>
>
> your reply reinforces my point. i'm not talking about xxx_init(), i'm talking
> about xxx_initialize(). network drivers atm define both -- xxx_initialize()
> is to initialize the eth_driver structure and *register* with the eth layer,
> and xxx_init() to *initialize* the hardware. i'm proposing renaming
> xxx_initialize() to xxx_register().
> -mike
>
I understand what you're saying, and think in principle it's probably a
good idea to rename to something other than xxx_initialize(). I just
think a document that outlines best practices that are not in use *at
all* seems a bit silly.
If we're going to go this way, IMHO we should change all function names
at once. It would be easy to do, but would be a huge, potentially
intrusive patch that I'm not sure buys us much.
regards,
Ben
next prev parent reply other threads:[~2009-07-21 20:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 1:39 [U-Boot] eth/net driver documentation Mike Frysinger
2009-07-16 17:36 ` Ben Warren
2009-07-19 1:04 ` [U-Boot] [PATCH 1/2] net: rename NetRxPkt to NetRxPacket Mike Frysinger
2009-07-21 4:49 ` Ben Warren
2009-07-19 1:04 ` [U-Boot] [PATCH 2/2] document network driver framework Mike Frysinger
2009-07-21 5:09 ` Ben Warren
2009-07-21 6:28 ` Mike Frysinger
2009-07-21 7:32 ` Wolfgang Denk
2009-07-21 20:38 ` Mike Frysinger
2009-07-21 20:55 ` Ben Warren [this message]
2009-07-21 21:08 ` Mike Frysinger
2009-07-21 7:27 ` Wolfgang Denk
2009-07-22 23:00 ` Andy Fleming
2009-07-23 0:16 ` Mike Frysinger
2009-07-23 21:49 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-23 22:06 ` Wolfgang Denk
2009-07-23 22:14 ` Ben Warren
2009-07-23 22:24 ` Wolfgang Denk
2009-09-09 18:41 ` [U-Boot] [PATCH v2] " Mike Frysinger
2009-09-22 18:34 ` Wolfgang Denk
2009-10-04 19:12 ` Wolfgang Denk
2009-10-04 22:07 ` Ben Warren
2009-10-05 6:05 ` Ben Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A662B46.5020701@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox