Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102132
b: refs/heads/master
c: 85ae98a
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Bartlomiej Zolnierkiewicz committed Jul 16, 2008
1 parent 6be8714 commit 6402841
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68dc3575e064a5655cbd656fbf32d6ceeb85ac9e
refs/heads/master: 85ae98a3dff2da860a4f8f9e4a0de69ad82ce633
16 changes: 8 additions & 8 deletions trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,10 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive)
set_disk_ro(floppy->disk, floppy->wp);
page = &pc.buf[8];

transfer_rate = be16_to_cpu(*(u16 *)&pc.buf[8 + 2]);
sector_size = be16_to_cpu(*(u16 *)&pc.buf[8 + 6]);
cyls = be16_to_cpu(*(u16 *)&pc.buf[8 + 8]);
rpm = be16_to_cpu(*(u16 *)&pc.buf[8 + 28]);
transfer_rate = be16_to_cpup((__be16 *)&pc.buf[8 + 2]);
sector_size = be16_to_cpup((__be16 *)&pc.buf[8 + 6]);
cyls = be16_to_cpup((__be16 *)&pc.buf[8 + 8]);
rpm = be16_to_cpup((__be16 *)&pc.buf[8 + 28]);
heads = pc.buf[8 + 4];
sectors = pc.buf[8 + 5];

Expand Down Expand Up @@ -780,8 +780,8 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
for (i = 0; i < desc_cnt; i++) {
unsigned int desc_start = 4 + i*8;

blocks = be32_to_cpu(*(u32 *)&pc.buf[desc_start]);
length = be16_to_cpu(*(u16 *)&pc.buf[desc_start + 6]);
blocks = be32_to_cpup((__be32 *)&pc.buf[desc_start]);
length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]);

debug_log("Descriptor %d: %dkB, %d blocks, %d sector size\n",
i, blocks * length / 1024, blocks, length);
Expand Down Expand Up @@ -902,8 +902,8 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, int __user *arg)
if (u_index >= u_array_size)
break; /* User-supplied buffer too small */

blocks = be32_to_cpu(*(u32 *)&pc.buf[desc_start]);
length = be16_to_cpu(*(u16 *)&pc.buf[desc_start + 6]);
blocks = be32_to_cpup((__be32 *)&pc.buf[desc_start]);
length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]);

if (put_user(blocks, argp))
return(-EFAULT);
Expand Down

0 comments on commit 6402841

Please sign in to comment.