Re: Linuv 2.6.15-rc1
From: Linus Torvalds
Date: Wed Nov 16 2005 - 11:09:35 EST
On Wed, 16 Nov 2005, Zhu Yi wrote:
>
> Please try the patch below and see if it makes any difference.
> http://bughost.org/bugzilla/show_bug.cgi?id=821
Hmm. That patch does
+ error->log = (struct ipw_event *)((u8 *)error->elem +
(sizeof(*error->elem) * elem_len));
which really can be much more cleanly written as
error->log = (void *)(error->elem + elem_len);
since pointer addition does the "multiply by pointer element size" on it's
own.
For future reference, you want to make just a byte add, the cleanest way
(in kernel, where we use the gcc "void *" additions) is
newptr = offset + (void *)oldptr;
ho humm..
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/