summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/xen-scsifront.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-04-22 03:21:13 +0200
committerJuergen Gross <jgross@suse.com>2017-05-02 11:14:53 +0200
commit6483e3135a693548874429db901c0544d3a9b4cd (patch)
treef0d0e8f1ad71fc7c28306af0dd6da6a7858e7b43 /drivers/scsi/xen-scsifront.c
parentxen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops (diff)
downloadlinux-6483e3135a693548874429db901c0544d3a9b4cd.tar.xz
linux-6483e3135a693548874429db901c0544d3a9b4cd.zip
xen/scsifront: use offset_in_page() macro
Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/scsi/xen-scsifront.c')
-rw-r--r--drivers/scsi/xen-scsifront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 9aa1fe1fc939..a6a8b60d4902 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -434,7 +434,7 @@ static int map_data_for_request(struct vscsifrnt_info *info,
if (seg_grants) {
page = virt_to_page(seg);
- off = (unsigned long)seg & ~PAGE_MASK;
+ off = offset_in_page(seg);
len = sizeof(struct scsiif_request_segment) * data_grants;
while (len > 0) {
bytes = min_t(unsigned int, len, PAGE_SIZE - off);