Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628716 > unrolled thread

[PATCH] xen/scsifront: use offset_in_page() macro

Started byGeliang Tang <geliangtang@gmail.com>
First post2017-04-22 03:30 +0200
Last post2017-04-25 09:00 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] xen/scsifront: use offset_in_page() macro Geliang Tang <geliangtang@gmail.com> - 2017-04-22 03:30 +0200
    Re: [PATCH] xen/scsifront: use offset_in_page() macro Juergen Gross <jgross@suse.com> - 2017-04-24 07:10 +0200
      Re: [PATCH] xen/scsifront: use offset_in_page() macro "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-04-25 00:20 +0200
        Re: [PATCH] xen/scsifront: use offset_in_page() macro Juergen Gross <jgross@suse.com> - 2017-04-25 07:10 +0200
    Re: [PATCH] xen/scsifront: use offset_in_page() macro Juergen Gross <jgross@suse.com> - 2017-04-25 09:00 +0200

#1628716 — [PATCH] xen/scsifront: use offset_in_page() macro

FromGeliang Tang <geliangtang@gmail.com>
Date2017-04-22 03:30 +0200
Subject[PATCH] xen/scsifront: use offset_in_page() macro
Message-ID<tyS26-4Ml-9@gated-at.bofh.it>
Use offset_in_page() macro instead of open-coding.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/scsi/xen-scsifront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 9aa1fe1..a6a8b60 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);
-- 
2.9.3

[toc] | [next] | [standalone]


#1629197

FromJuergen Gross <jgross@suse.com>
Date2017-04-24 07:10 +0200
Message-ID<tzEq6-2Fz-3@gated-at.bofh.it>
In reply to#1628716
On 22/04/17 03:21, Geliang Tang wrote:
> Use offset_in_page() macro instead of open-coding.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Thanks,

Juergen

[toc] | [prev] | [next] | [standalone]


#1630081

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2017-04-25 00:20 +0200
Message-ID<tzUuS-4jY-5@gated-at.bofh.it>
In reply to#1629197
Juergen,

> On 22/04/17 03:21, Geliang Tang wrote:
>> Use offset_in_page() macro instead of open-coding.
>> 
>> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
>
> Reviewed-by: Juergen Gross <jgross@suse.com>

Taking this through the Xen tree or should I queue it?

-- 
Martin K. Petersen	Oracle Linux Engineering

[toc] | [prev] | [next] | [standalone]


#1630186

FromJuergen Gross <jgross@suse.com>
Date2017-04-25 07:10 +0200
Message-ID<tA0TD-ex-3@gated-at.bofh.it>
In reply to#1630081
On 25/04/17 00:15, Martin K. Petersen wrote:
> 
> Juergen,
> 
>> On 22/04/17 03:21, Geliang Tang wrote:
>>> Use offset_in_page() macro instead of open-coding.
>>>
>>> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
>>
>> Reviewed-by: Juergen Gross <jgross@suse.com>
> 
> Taking this through the Xen tree or should I queue it?

I can take it through the Xen tree.


Thanks,

Juergen

[toc] | [prev] | [next] | [standalone]


#1630226

FromJuergen Gross <jgross@suse.com>
Date2017-04-25 09:00 +0200
Message-ID<tA2C6-1bC-13@gated-at.bofh.it>
In reply to#1628716
On 22/04/17 03:21, Geliang Tang wrote:
> Use offset_in_page() macro instead of open-coding.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Pushed to xen/tip for-linus-4.12


Thanks,

Juergen

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web