mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
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>
This commit is contained in:
parent
d5ff5061c3
commit
6483e3135a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user