[parisc-linux] Cast of lvalue warning in the last k 2.6.5-rc2
with last gcc-3.3 (next)
Matthew Wilcox
willy at debian.org
Wed Mar 24 14:06:31 MST 2004
On Wed, Mar 24, 2004 at 04:54:52PM +0100, Joel Soete wrote:
> here is the next io.c diff file proposal (if some interest :) )
> --- arch/parisc/lib/io.c.orig 2004-03-24 14:47:42.703516192 +0100
> +++ arch/parisc/lib/io.c 2004-03-24 14:52:46.808285240 +0100
> @@ -21,19 +21,19 @@
> goto bytecopy;
> while (dest & 3) {
> writeb(*(char *)src, dest++);
> - ((char *)src)++;
> - count--;
> + src += sizeof(char);
> + count -= sizeof(char);
eww. Here's my attempt at something similar:
@@ -20,8 +20,9 @@ void __memcpy_toio(unsigned long dest, u
if ((dest & 3) != (src & 3))
goto bytecopy;
while (dest & 3) {
- writeb(*(char *)src, dest++);
- ((char *)src)++;
+ writeb(*(char *)src, dest);
+ src++;
+ dest++;
count--;
}
while (count > 3) {
> }
> while (count > 3) {
> __raw_writel(*(u32 *)src, dest);
> - src += 4;
> - dest += 4;
> - count -= 4;
> + src += sizeof(u32);
> + dest += sizeof(u32);
> + count -= sizeof(u32);
No, don't change these.
> bytecopy:
> while (count--) {
> writeb(*(char *)src, dest++);
> - ((char *)src)++;
> + src += sizeof(char);
...
- writeb(*(char *)src, dest++);
- ((char *)src)++;
+ writeb(*(char *)src, dest);
+ src++;
+ dest++;
...
I don't have time to finish off this patch right now. Want to take a
stab at redoing it?
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
More information about the parisc-linux
mailing list