public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gdth: use offset_in_page() macro
       [not found] <4dbc77ccaaed98b183cf4dba58a4fa325fd65048.1492758503.git.geliangtang@gmail.com>
@ 2017-04-22  1:21 ` Geliang Tang
  2017-04-22  1:21 ` [PATCH] xen/scsifront: " Geliang Tang
  1 sibling, 0 replies; 6+ messages in thread
From: Geliang Tang @ 2017-04-22  1:21 UTC (permalink / raw)
  To: Achim Leubner, James E.J. Bottomley, Martin K. Petersen
  Cc: Geliang Tang, linux-scsi, linux-kernel

Use offset_in_page() macro instead of open-coding.

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

diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index d020a13..557ce73 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -2648,7 +2648,7 @@ static int gdth_fill_raw_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, u8 b)
 
     } else {
         page = virt_to_page(scp->sense_buffer);
-        offset = (unsigned long)scp->sense_buffer & ~PAGE_MASK;
+	offset = offset_in_page(scp->sense_buffer);
         sense_paddr = pci_map_page(ha->pdev,page,offset,
                                    16,PCI_DMA_FROMDEVICE);
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] xen/scsifront: use offset_in_page() macro
       [not found] <4dbc77ccaaed98b183cf4dba58a4fa325fd65048.1492758503.git.geliangtang@gmail.com>
  2017-04-22  1:21 ` [PATCH] gdth: use offset_in_page() macro Geliang Tang
@ 2017-04-22  1:21 ` Geliang Tang
  2017-04-24  5:05   ` Juergen Gross
  2017-04-25  6:58   ` Juergen Gross
  1 sibling, 2 replies; 6+ messages in thread
From: Geliang Tang @ 2017-04-22  1:21 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky, James E.J. Bottomley,
	Martin K. Petersen
  Cc: Geliang Tang, xen-devel, linux-scsi, linux-kernel

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/scsifront: use offset_in_page() macro
  2017-04-22  1:21 ` [PATCH] xen/scsifront: " Geliang Tang
@ 2017-04-24  5:05   ` Juergen Gross
  2017-04-24 22:15     ` Martin K. Petersen
  2017-04-25  6:58   ` Juergen Gross
  1 sibling, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2017-04-24  5:05 UTC (permalink / raw)
  To: Geliang Tang, Boris Ostrovsky, James E.J. Bottomley,
	Martin K. Petersen
  Cc: xen-devel, linux-scsi, linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/scsifront: use offset_in_page() macro
  2017-04-24  5:05   ` Juergen Gross
@ 2017-04-24 22:15     ` Martin K. Petersen
  2017-04-25  5:07       ` Juergen Gross
  0 siblings, 1 reply; 6+ messages in thread
From: Martin K. Petersen @ 2017-04-24 22:15 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Geliang Tang, Boris Ostrovsky, James E.J. Bottomley,
	Martin K. Petersen, xen-devel, linux-scsi, linux-kernel


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/scsifront: use offset_in_page() macro
  2017-04-24 22:15     ` Martin K. Petersen
@ 2017-04-25  5:07       ` Juergen Gross
  0 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2017-04-25  5:07 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Geliang Tang, Boris Ostrovsky, James E.J. Bottomley, xen-devel,
	linux-scsi, linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/scsifront: use offset_in_page() macro
  2017-04-22  1:21 ` [PATCH] xen/scsifront: " Geliang Tang
  2017-04-24  5:05   ` Juergen Gross
@ 2017-04-25  6:58   ` Juergen Gross
  1 sibling, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2017-04-25  6:58 UTC (permalink / raw)
  To: Geliang Tang, Boris Ostrovsky, James E.J. Bottomley,
	Martin K. Petersen
  Cc: xen-devel, linux-scsi, linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-25  6:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4dbc77ccaaed98b183cf4dba58a4fa325fd65048.1492758503.git.geliangtang@gmail.com>
2017-04-22  1:21 ` [PATCH] gdth: use offset_in_page() macro Geliang Tang
2017-04-22  1:21 ` [PATCH] xen/scsifront: " Geliang Tang
2017-04-24  5:05   ` Juergen Gross
2017-04-24 22:15     ` Martin K. Petersen
2017-04-25  5:07       ` Juergen Gross
2017-04-25  6:58   ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox