From: Tabi Timur-B04825 <B04825@freescale.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Xie Shaohui-B21989 <B21989@freescale.com>
Subject: Re: [PATCH] powerpc/usb: use unsigned long to type cast an address of ioremap
Date: Thu, 3 Nov 2011 12:07:19 +0000 [thread overview]
Message-ID: <4EB283F5.6000202@freescale.com> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6D8AEA3@saturn3.aculab.com>
David Laight wrote:
>> > usb_sys_regs =3D (void *)dr_regs + USB_DR_SYS_OFFSET;
> But that is invalid C.
What's invalid about it? I haven't tried compiling this specific line of=20
code, but I've done stuff like it in the past many times.
Are you talking about adding an integer to a void pointer? If so, then=20
that's something that gcc supports and that the kernel uses all over the=20
place. A char* is incorrect because a char could be more than one byte,=20
in theory.
--=20
Timur Tabi
Linux kernel developer at Freescale=
next prev parent reply other threads:[~2011-11-03 12:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 9:58 [PATCH] powerpc/usb: use unsigned long to type cast an address of ioremap Shaohui Xie
2011-11-03 11:14 ` David Laight
2011-11-03 11:38 ` Tabi Timur-B04825
2011-11-03 11:38 ` David Laight
2011-11-03 12:07 ` Tabi Timur-B04825 [this message]
2011-11-03 12:16 ` David Laight
2011-11-03 14:12 ` Timur Tabi
2011-11-03 22:08 ` Segher Boessenkool
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=4EB283F5.6000202@freescale.com \
--to=b04825@freescale.com \
--cc=B21989@freescale.com \
--cc=David.Laight@ACULAB.COM \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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 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.