summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-03-07 13:28:10 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-03-13 09:23:46 +0100
commitbdd0ab97506cf3f4667b8c42d5b20606c2321f46 (patch)
tree7ced40e753380dc90f88c6168990806772344fff /drivers
parents390/virtio_ccw: avoid converting dma addresses / handles (diff)
downloadlinux-bdd0ab97506cf3f4667b8c42d5b20606c2321f46.tar.xz
linux-bdd0ab97506cf3f4667b8c42d5b20606c2321f46.zip
s390/dasd: remove superfluous virt_to_phys() conversion
Only the last 12 bits of virtual / physical addresses are used when masking with IDA_BLOCK_SIZE - 1. Given that the bits are the same regardless of virtual or physical address, remove the virtual to physical address conversion. Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/dasd_eckd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 698817648053..71fa4488aa47 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -4259,7 +4259,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
* idaw ends
*/
if (!idaw_dst) {
- if ((__u32)virt_to_phys(dst) & (IDA_BLOCK_SIZE - 1)) {
+ if ((unsigned long)(dst) & (IDA_BLOCK_SIZE - 1)) {
dasd_sfree_request(cqr, startdev);
return ERR_PTR(-ERANGE);
} else
@@ -4279,7 +4279,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
* idal_create_words will handle cases where idaw_len
* is larger then IDA_BLOCK_SIZE
*/
- if (!((__u32)virt_to_phys(idaw_dst + idaw_len) & (IDA_BLOCK_SIZE - 1)))
+ if (!((unsigned long)(idaw_dst + idaw_len) & (IDA_BLOCK_SIZE - 1)))
end_idaw = 1;
/* We also need to end the idaw at track end */
if (!len_to_track_end) {