linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Tom Rini <trini@kernel.crashing.org>
Cc: Armin Kuster <akuster@mvista.com>,
	linuxppc-embedded@lists.linuxppc.org,
	Paul Mackerras <paulus@samba.org>
Subject: Re: Trivial cleanup in ocp_uart.c
Date: Fri, 21 Jun 2002 10:52:16 +1000	[thread overview]
Message-ID: <20020621005216.GH20689@zax> (raw)
In-Reply-To: <20020620155026.GE16052@opus.bloom.county>


On Thu, Jun 20, 2002 at 08:50:26AM -0700, Tom Rini wrote:
>
> On Thu, Jun 20, 2002 at 05:34:40PM +1000, David Gibson wrote:
>
> > ocp_uart.c allocates private space with ocp_alloc_dev, but never uses
> > it.
>
> Er...  So you pass 0 to ocp_alloc_dev() ?  Which will allocate
> (sizeof(*ocp_dev) + 0 + 31), so we don't actually break out of this
> loop which I take it was your intent.

No that wasn't my intent.  It's just that we never use the private
space, so there's no point allocating it.  Passing zero is the best we
can do for now (and it's what every other ocp driver except i2c does
now).  Actually I'd like drivers to include struct ocp_dev as part of
their own internal private structures rather than the other way around
(i.e. I think the ocpdev field should go away entirely).
I2C needs some rearranging to do this though (rearranging which will
also let the vaddr field be removed).

> And I think it can be used, once it gets registered to the ocp_list (and
> something later accesses it).

*Nothing* scans the ocp_list (well, except ocp_register() and
ocp_unregister()).  This is why I think ocp_register() is a pointless
interface.

--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-06-21  0:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-20  7:34 Trivial cleanup in ocp_uart.c David Gibson
2002-06-20 15:50 ` Tom Rini
2002-06-21  0:52   ` David Gibson [this message]
2002-06-21 14:39     ` Tom Rini
2002-06-24  7:40       ` David Gibson
2002-06-26 17:27         ` Scott Anderson
2002-06-27  0:41           ` David Gibson
2002-06-27 16:23             ` Scott Anderson
2002-06-27 16:52               ` Kenneth Johansson
2002-06-28  0:59               ` David Gibson
2002-06-28 14:57                 ` Tom Rini
2002-06-27 21:21         ` Armin Kuster
2002-06-27 20:30           ` Paul Mackerras
2002-06-27 21:12             ` Kenneth Johansson

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=20020621005216.GH20689@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=akuster@mvista.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=paulus@samba.org \
    --cc=trini@kernel.crashing.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).