Skip to content

Commit 5fad507

Browse files
fthainDamien Le Moal
authored andcommitted
pata_falcon: Avoid type warnings from sparse
The zero day bot reported some sparse complaints in pata_falcon.c. E.g. drivers/ata/pata_falcon.c:58:41: warning: cast removes address space '__iomem' of expression drivers/ata/pata_falcon.c:58:41: warning: incorrect type in argument 1 (different address spaces) drivers/ata/pata_falcon.c:58:41: expected unsigned short volatile [noderef] [usertype] __iomem *port drivers/ata/pata_falcon.c:58:41: got unsigned short [usertype] * The same thing shows up in 8 places, all told. Avoid this by removing unnecessary type casts. Cc: Jens Axboe <[email protected]> Cc: Michael Schmitz <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Reported-by: kernel test robot <[email protected]> Suggested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Finn Thain <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent d58071a commit 5fad507

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/ata/pata_falcon.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ static unsigned int pata_falcon_data_xfer(struct ata_queued_cmd *qc,
5555
/* Transfer multiple of 2 bytes */
5656
if (rw == READ) {
5757
if (swap)
58-
raw_insw_swapw((u16 *)data_addr, (u16 *)buf, words);
58+
raw_insw_swapw(data_addr, (u16 *)buf, words);
5959
else
60-
raw_insw((u16 *)data_addr, (u16 *)buf, words);
60+
raw_insw(data_addr, (u16 *)buf, words);
6161
} else {
6262
if (swap)
63-
raw_outsw_swapw((u16 *)data_addr, (u16 *)buf, words);
63+
raw_outsw_swapw(data_addr, (u16 *)buf, words);
6464
else
65-
raw_outsw((u16 *)data_addr, (u16 *)buf, words);
65+
raw_outsw(data_addr, (u16 *)buf, words);
6666
}
6767

6868
/* Transfer trailing byte, if any. */
@@ -74,16 +74,16 @@ static unsigned int pata_falcon_data_xfer(struct ata_queued_cmd *qc,
7474

7575
if (rw == READ) {
7676
if (swap)
77-
raw_insw_swapw((u16 *)data_addr, (u16 *)pad, 1);
77+
raw_insw_swapw(data_addr, (u16 *)pad, 1);
7878
else
79-
raw_insw((u16 *)data_addr, (u16 *)pad, 1);
79+
raw_insw(data_addr, (u16 *)pad, 1);
8080
*buf = pad[0];
8181
} else {
8282
pad[0] = *buf;
8383
if (swap)
84-
raw_outsw_swapw((u16 *)data_addr, (u16 *)pad, 1);
84+
raw_outsw_swapw(data_addr, (u16 *)pad, 1);
8585
else
86-
raw_outsw((u16 *)data_addr, (u16 *)pad, 1);
86+
raw_outsw(data_addr, (u16 *)pad, 1);
8787
}
8888
words++;
8989
}

0 commit comments

Comments
 (0)