From: Sergei Shtylyov <sshtylyov@ru•mvista.com>
To: Matt Sealey <matt@genesi-usa•com>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: RFC: MPC5200 PSC AC97 driver
Date: Thu, 17 Apr 2008 19:46:54 +0400 [thread overview]
Message-ID: <480770EE.9060407@ru.mvista.com> (raw)
In-Reply-To: <4807701F.9030105@genesi-usa.com>
Matt Sealey wrote:
>>>> + /* the fifo starts right after psc ends */
>>>> + priv->fifo = (struct mpc52xx_psc_fifo*)&priv->psc[1]; /*
>>>> FIXME */
>>> Wouldn't
>>> priv->fifo = (struct mpc52xx_psc_fifo*) (priv->psc + sizeof(struct
>>> mpc52xx_psc));
>>> Be a little less obtuse use of C?
>> "priv->psc" is of type "struct mpc52xx_ac97_priv*". If I add 0x58 to
>> it, wouldn't I add 0x58 times the size of "struct mpc52xx_ac97_priv"?
> I always got a result of MBAR+PSC_OFFSET(n)+0x58 out of it as I expected.
> priv->psc is of type struct mpc52xx_psc * which means it's just pointer
> arithmetic. If you add a value to it (not increment or so as if it's
> an array) then it just adds the value, no?
Of course no -- that'll be pointer arithmetic unless you cast the pointer
to an integer type.
WBR, Sergei
next prev parent reply other threads:[~2008-04-17 15:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 10:44 State of the MPC5200 PSC AC97 driver Marian Balakowicz
2008-04-10 13:50 ` Robert Schwebel
2008-04-10 15:25 ` Matt Sealey
2008-04-11 6:51 ` Robert Schwebel
2008-04-11 7:34 ` Sven Luther
2008-04-11 7:29 ` Sylvain Munaut
2008-04-15 8:03 ` Juergen Beisert
2008-04-16 11:24 ` Juergen Beisert
2008-04-17 14:19 ` RFC: " Juergen Beisert
2008-04-17 14:23 ` Matt Sealey
2008-04-17 14:41 ` Juergen Beisert
2008-04-17 14:54 ` Matt Sealey
2008-04-17 15:05 ` Matt Sealey
2008-04-17 15:23 ` Juergen Beisert
2008-04-17 15:10 ` Matt Sealey
2008-04-17 15:23 ` Juergen Beisert
2008-04-17 15:43 ` Matt Sealey
2008-04-17 15:46 ` Sergei Shtylyov [this message]
2008-04-18 15:43 ` Peter Czanik
2008-04-18 16:02 ` Juergen Beisert
2008-04-18 18:11 ` Matt Sealey
2008-04-18 22:53 ` Grant Likely
2008-04-19 12:02 ` Matt Sealey
2008-04-19 15:59 ` Grant Likely
2008-04-21 8:02 ` Juergen Beisert
2008-04-21 17:04 ` Matt Sealey
2008-04-19 16:03 ` Grant Likely
2008-04-22 14:20 ` Olaf Hering
2008-04-11 9:23 ` State of the " Marian Balakowicz
2008-04-11 13:50 ` Grant Likely
2008-04-11 14:53 ` Marian Balakowicz
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=480770EE.9060407@ru.mvista.com \
--to=sshtylyov@ru$(echo .)mvista.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=matt@genesi-usa$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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