Commit 27d87183 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] paride endianness annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ecb7524c
...@@ -663,11 +663,11 @@ static enum action pd_identify(struct pd_unit *disk) ...@@ -663,11 +663,11 @@ static enum action pd_identify(struct pd_unit *disk)
return Fail; return Fail;
pi_read_block(disk->pi, pd_scratch, 512); pi_read_block(disk->pi, pd_scratch, 512);
disk->can_lba = pd_scratch[99] & 2; disk->can_lba = pd_scratch[99] & 2;
disk->sectors = le16_to_cpu(*(u16 *) (pd_scratch + 12)); disk->sectors = le16_to_cpu(*(__le16 *) (pd_scratch + 12));
disk->heads = le16_to_cpu(*(u16 *) (pd_scratch + 6)); disk->heads = le16_to_cpu(*(__le16 *) (pd_scratch + 6));
disk->cylinders = le16_to_cpu(*(u16 *) (pd_scratch + 2)); disk->cylinders = le16_to_cpu(*(__le16 *) (pd_scratch + 2));
if (disk->can_lba) if (disk->can_lba)
disk->capacity = le32_to_cpu(*(u32 *) (pd_scratch + 120)); disk->capacity = le32_to_cpu(*(__le32 *) (pd_scratch + 120));
else else
disk->capacity = disk->sectors * disk->heads * disk->cylinders; disk->capacity = disk->sectors * disk->heads * disk->cylinders;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment