From: linas@austin.ibm.com (Linas Vepstas)
To: Michael Ellerman <michael@ellerman.id.au>
Cc: sparclinux@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>,
Paul Mackerras <paulus@samba.org>,
"David S. Miller" <davem@davemloft.net>,
linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c
Date: Wed, 17 Oct 2007 18:04:49 -0500 [thread overview]
Message-ID: <20071017230449.GZ4891@austin.ibm.com> (raw)
In-Reply-To: <dadd2b9540369b9e2c6773b2a60021dadafa58e2.1192605144.git.michael@ellerman.id.au>
On Wed, Oct 17, 2007 at 05:12:27PM +1000, Michael Ellerman wrote:
> +struct device_node *of_get_pci_dev_node(struct pci_dev *pdev)
> +{
> + return of_node_get(pci_device_to_OF_node(pdev));
> +}
[...]
> - dn = of_node_get(pci_device_to_OF_node(dev));
> + dn = of_get_pci_dev_node(dev);
Is this really useful or wise?
As a matter of personal taste, I find stuff like this clutters
and confuses my mind. I go to read new code, and I run across some
routine I haven't heard of before ... e.g. of_get_pci_dev_node(),
so now I have to look it up to see what it does. A few minutes later,
I realize that its just a pair of old freinds (of_node_get and
pci_device_to_OF_node) and so now I have to make mental room for it.
Tommorrow, or 3 days later, I'm again looking at of_get_pci_dev_node()
and I'm thinking "gee what did that thing do again??"
I don't much like this style, and I've been known to submit
patches that remove stuff like this ...
--linas
next prev parent reply other threads:[~2007-10-17 23:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 7:12 [PATCH 1/2] Introduce of_get_pci_dev_node() Michael Ellerman
2007-10-17 7:12 ` [PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c Michael Ellerman
2007-10-17 11:22 ` David Miller
2007-10-17 11:23 ` David Miller
2007-10-18 1:23 ` Michael Ellerman
2007-10-17 11:36 ` Benjamin Herrenschmidt
2007-10-18 1:30 ` Michael Ellerman
2007-10-17 23:04 ` Linas Vepstas [this message]
2007-10-18 1:27 ` Michael Ellerman
2007-10-18 19:09 ` Linas Vepstas
2007-10-23 7:36 ` Michael Ellerman
2007-10-23 7:40 ` Benjamin Herrenschmidt
2007-10-18 5:22 ` Stephen Rothwell
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=20071017230449.GZ4891@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
--cc=sparclinux@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).