On Sun, Jul 17, 2005 at 02:20:21PM +0200, Andreas Steinmetz wrote:
> from include/linux/kernel.h:
>
> #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
>
> from crypto/cipher.c:
>
> unsigned int alignmask = ...
> u8 *src = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
The type foolery you
On Sun, Jul 17, 2005 at 02:20:21PM +0200, Andreas Steinmetz wrote:
from include/linux/kernel.h:
#define ALIGN(x,a) (((x)+(a)-1)~((a)-1))
from crypto/cipher.c:
unsigned int alignmask = ...
u8 *src = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
The type foolery you suggested is
From: Herbert Xu <[EMAIL PROTECTED]>
Date: Mon, 18 Jul 2005 06:45:54 +1000
> On Sun, Jul 17, 2005 at 02:20:21PM +0200, Andreas Steinmetz wrote:
> >
> > The compiler first does ~((a)-1)) and then expands the unsigned int to
> > unsigned long for the & operation. So we end up with only the lower
From: Herbert Xu [EMAIL PROTECTED]
Date: Mon, 18 Jul 2005 06:45:54 +1000
On Sun, Jul 17, 2005 at 02:20:21PM +0200, Andreas Steinmetz wrote:
The compiler first does ~((a)-1)) and then expands the unsigned int to
unsigned long for the operation. So we end up with only the lower 32
bits
On Sun, Jul 17, 2005 at 02:20:21PM +0200, Andreas Steinmetz wrote:
>
> The compiler first does ~((a)-1)) and then expands the unsigned int to
> unsigned long for the & operation. So we end up with only the lower 32
> bits of the address. Who did smoke what to do this? Patch attached.
Thanks for
from include/linux/kernel.h:
#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
from crypto/cipher.c:
unsigned int alignmask = ...
u8 *src = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
...
unsigned int alignmask = ...
u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
...
unsigned int
from include/linux/kernel.h:
#define ALIGN(x,a) (((x)+(a)-1)~((a)-1))
from crypto/cipher.c:
unsigned int alignmask = ...
u8 *src = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
...
unsigned int alignmask = ...
u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
...
unsigned int
On Sun, Jul 17, 2005 at 02:20:21PM +0200, Andreas Steinmetz wrote:
The compiler first does ~((a)-1)) and then expands the unsigned int to
unsigned long for the operation. So we end up with only the lower 32
bits of the address. Who did smoke what to do this? Patch attached.
Thanks for the
8 matches
Mail list logo