linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix virtual and physical address types
@ 2011-12-21  1:29 Ben Hutchings
  2011-12-21  1:34 ` [PATCH 5/8] [SCSI] tgt: Pass pointers to virt_to_page(), not integers Ben Hutchings
  2011-12-21  1:37 ` [PATCH 8/8] pmcraid: Pass pointers to access_ok(), " Ben Hutchings
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Hutchings @ 2011-12-21  1:29 UTC (permalink / raw)
  To: LKML
  Cc: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kevin Curtis,
	netdev-u79uwXL29TY76Z2rM5mHXA, David Airlie,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, James E.J. Bottomley,
	linux-scsi, Hans J. Koch, Greg Kroah-Hartman, Venkat Venkatsubra,
	rds-devel-N0ozoZBvEnrZJqsBc5GL+g, Anil Ravindranath

[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]

This series fixes compiler warnings on some architectures about implicit
conversions and narrowing conversions between pointer and integer types.

Please apply these to the appropriate trees.

Ben.

Ben Hutchings (8):
  IB/cxgb4: Fix formatting of physical address
  farsync: Fix confusion about DMA address and buffer offset types
  drm: Do not include page offset in argument to virt_to_page()
  drm: Pass pointers to virt_to_page()
  [SCSI] tgt: Pass pointers to virt_to_page(), not integers
  uio: Pass pointers to virt_to_page(), not integers
  rds: Pass pointers to virt_to_page(), not integers
  pmcraid: Pass pointers to access_ok(), not integers

 drivers/gpu/drm/drm_pci.c            |    4 ++--
 drivers/gpu/drm/drm_vm.c             |    2 +-
 drivers/infiniband/hw/cxgb4/device.c |    4 ++--
 drivers/net/wan/farsync.c            |   19 +++++++------------
 drivers/scsi/pmcraid.c               |    3 ++-
 drivers/scsi/scsi_tgt_if.c           |    2 +-
 drivers/uio/uio.c                    |    6 ++++--
 net/rds/message.c                    |    2 +-
 8 files changed, 20 insertions(+), 22 deletions(-)

-- 
1.7.7.3



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* [PATCH 5/8] [SCSI] tgt: Pass pointers to virt_to_page(), not integers
  2011-12-21  1:29 [PATCH 0/8] Fix virtual and physical address types Ben Hutchings
@ 2011-12-21  1:34 ` Ben Hutchings
  2011-12-21  1:37 ` [PATCH 8/8] pmcraid: Pass pointers to access_ok(), " Ben Hutchings
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2011-12-21  1:34 UTC (permalink / raw)
  To: James E.J. Bottomley, linux-scsi; +Cc: LKML

Most architectures define virt_to_page() as a macro that casts its
argument such that an argument of type unsigned long will be accepted
without complaint.  However, the proper type is void *, and passing
unsigned long results in a warning on MIPS.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/scsi/scsi_tgt_if.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c
index 6209110..7199753 100644
--- a/drivers/scsi/scsi_tgt_if.c
+++ b/drivers/scsi/scsi_tgt_if.c
@@ -286,7 +286,7 @@ static int uspace_ring_map(struct vm_area_struct *vma, unsigned long addr,
 	int i, err;
 
 	for (i = 0; i < TGT_RING_PAGES; i++) {
-		struct page *page = virt_to_page(ring->tr_pages[i]);
+		struct page *page = virt_to_page((void *)ring->tr_pages[i]);
 		err = vm_insert_page(vma, addr, page);
 		if (err)
 			return err;
-- 
1.7.7.3

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

* [PATCH 8/8] pmcraid: Pass pointers to access_ok(), not integers
  2011-12-21  1:29 [PATCH 0/8] Fix virtual and physical address types Ben Hutchings
  2011-12-21  1:34 ` [PATCH 5/8] [SCSI] tgt: Pass pointers to virt_to_page(), not integers Ben Hutchings
@ 2011-12-21  1:37 ` Ben Hutchings
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2011-12-21  1:37 UTC (permalink / raw)
  To: Anil Ravindranath, linux-scsi; +Cc: LKML

Most architectures define access_ok() as a macro that casts its
argument such that an argument of type unsigned long will be accepted
without complaint.  However, the proper type is void *, and passing
unsigned long results in a warning on sparc64.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/scsi/pmcraid.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 5163edb..01b29a6 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3807,7 +3807,8 @@ static long pmcraid_ioctl_passthrough(
 	}
 
 	if (request_size > 0) {
-		rc = access_ok(access, arg, request_offset + request_size);
+		rc = access_ok(access, (void *)arg,
+			       request_offset + request_size);
 
 		if (!rc) {
 			rc = -EFAULT;
-- 
1.7.7.3



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

end of thread, other threads:[~2011-12-21  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21  1:29 [PATCH 0/8] Fix virtual and physical address types Ben Hutchings
2011-12-21  1:34 ` [PATCH 5/8] [SCSI] tgt: Pass pointers to virt_to_page(), not integers Ben Hutchings
2011-12-21  1:37 ` [PATCH 8/8] pmcraid: Pass pointers to access_ok(), " Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).