Commit 6ad67403da47e833d9e418caf7f28295c9472e11
Committed by
Jeff Garzik
1 parent
3eabddb8ed
Exists in
master
and in
39 other branches
ata: endianness annotations in pata drivers
drivers/ata/pata_qdi.c:142:9: warning: incorrect type in assignment (different base types) drivers/ata/pata_qdi.c:142:9: expected unsigned int [unsigned] [usertype] pad drivers/ata/pata_qdi.c:142:9: got restricted __le32 [usertype] <noident> drivers/ata/pata_qdi.c:146:15: warning: cast to restricted __le32 drivers/ata/pata_winbond.c:110:9: warning: incorrect type in assignment (different base types) drivers/ata/pata_winbond.c:110:9: expected unsigned int [unsigned] [usertype] pad drivers/ata/pata_winbond.c:110:9: got restricted __le32 [usertype] <noident> drivers/ata/pata_winbond.c:114:15: warning: cast to restricted __le32 drivers/ata/pata_legacy.c:310:9: warning: incorrect type in assignment (different base types) drivers/ata/pata_legacy.c:310:9: expected unsigned int [unsigned] [usertype] pad drivers/ata/pata_legacy.c:310:9: got restricted __le32 [usertype] <noident> drivers/ata/pata_legacy.c:314:15: warning: cast to restricted __le32 drivers/ata/pata_legacy.c:752:11: warning: cast to restricted __le32 drivers/ata/pata_legacy.c:756:9: warning: incorrect type in assignment (different base types) drivers/ata/pata_legacy.c:756:9: expected unsigned int [unsigned] [addressable] [assigned] [usertype] pad drivers/ata/pata_legacy.c:756:9: got restricted __le32 [usertype] <noident> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Showing 3 changed files with 6 additions and 8 deletions Side-by-side Diff
drivers/ata/pata_legacy.c
... | ... | @@ -305,7 +305,7 @@ |
305 | 305 | iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
306 | 306 | |
307 | 307 | if (unlikely(slop)) { |
308 | - u32 pad; | |
308 | + __le32 pad; | |
309 | 309 | if (rw == READ) { |
310 | 310 | pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); |
311 | 311 | memcpy(buf + buflen - slop, &pad, slop); |
312 | 312 | |
313 | 313 | |
... | ... | @@ -746,14 +746,12 @@ |
746 | 746 | ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2); |
747 | 747 | |
748 | 748 | if (unlikely(slop)) { |
749 | - u32 pad; | |
749 | + __le32 pad; | |
750 | 750 | if (rw == WRITE) { |
751 | 751 | memcpy(&pad, buf + buflen - slop, slop); |
752 | - pad = le32_to_cpu(pad); | |
753 | - iowrite32(pad, ap->ioaddr.data_addr); | |
752 | + iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); | |
754 | 753 | } else { |
755 | - pad = ioread32(ap->ioaddr.data_addr); | |
756 | - pad = cpu_to_le32(pad); | |
754 | + pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); | |
757 | 755 | memcpy(buf + buflen - slop, &pad, slop); |
758 | 756 | } |
759 | 757 | } |
drivers/ata/pata_qdi.c
drivers/ata/pata_winbond.c