summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-04-22 04:21:13 +0300
committerJuergen Gross <jgross@suse.com>2017-05-02 12:14:53 +0300
commit6483e3135a693548874429db901c0544d3a9b4cd (patch)
treef0d0e8f1ad71fc7c28306af0dd6da6a7858e7b43 /drivers/scsi
parentd5ff5061c35448525fcb38950f06af6b9ae12c04 (diff)
downloadlinux-6483e3135a693548874429db901c0544d3a9b4cd.tar.xz
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')
-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);