public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: iso9660 endianness cleanup patch
@ 2001-05-01 14:40 Andrzej Krzysztofowicz
  2001-05-01 18:16 ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-05-01 14:40 UTC (permalink / raw)
  To: hpa; +Cc: Alan Cox, kernel list, torvalds, Andries.Brouwer


Are you sure that the arguments of the following casting

> +	return le16_to_cpu(*(u16 *)p);

> +	return be16_to_cpu(*(u16 *)p);

> +	return le32_to_cpu(*(u32 *)p);

> +	return be32_to_cpu(*(u32 *)p);

are properly aligned ?
I did not revise the code to check it, but AFAIK improperly aligned
char* pointers cause problem with casting to pointers to 16/32-bit data
on some architectures (I heard of sucj a problem with alpha).

Maybe there was a reason that the original code did operate on bytes here...

Andrzej

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-05-01 21:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-01 14:40 iso9660 endianness cleanup patch Andrzej Krzysztofowicz
2001-05-01 18:16 ` H. Peter Anvin
2001-05-01 18:43   ` H. Peter Anvin
2001-05-01 18:48   ` FIXED " H. Peter Anvin
2001-05-01 20:44   ` Alan Cox
2001-05-01 20:59   ` Linus Torvalds
2001-05-01 21:06     ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox