linux-stable/drivers/uio
Arnd Bergmann 190cc65e91 uio-hv-generic: store physical addresses instead of virtual
gcc warns about the newly added driver when phys_addr_t is wider than
a pointer:

drivers/uio/uio_hv_generic.c: In function 'hv_uio_mmap':
drivers/uio/uio_hv_generic.c:71:17: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    virt_to_phys((void *)info->mem[mi].addr) >> PAGE_SHIFT,
drivers/uio/uio_hv_generic.c: In function 'hv_uio_probe':
drivers/uio/uio_hv_generic.c:140:5: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   = (phys_addr_t)dev->channel->ringbuffer_pages;
drivers/uio/uio_hv_generic.c:147:3: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   (phys_addr_t)vmbus_connection.int_page;
drivers/uio/uio_hv_generic.c:153:3: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   (phys_addr_t)vmbus_connection.monitor_pages[1];

I can't see why we store a virtual address in a phys_addr_t here,
as the only user of that variable converts it into a physical
address anyway, so this moves the conversion to where it logically
fits according to the types.

Fixes: 95096f2fbd ("uio-hv-generic: new userspace i/o driver for VMBus")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-10 14:57:58 +01:00
..
Kconfig uio-hv-generic: new userspace i/o driver for VMBus 2016-12-06 11:52:49 +01:00
Makefile uio-hv-generic: new userspace i/o driver for VMBus 2016-12-06 11:52:49 +01:00
uio.c uio: add missing error codes 2016-05-01 14:11:12 -07:00
uio_aec.c uio: uio_aec: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00
uio_cif.c uio: uio_cif: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00
uio_dmem_genirq.c uio: fix dmem_region_start computation 2016-08-31 13:07:30 +02:00
uio_fsl_elbc_gpcm.c uio: uio_fsl_elbc_gpcm: Fix module autoload for OF platform driver 2015-10-04 12:32:25 +01:00
uio_hv_generic.c uio-hv-generic: store physical addresses instead of virtual 2016-12-10 14:57:58 +01:00
uio_mf624.c uio: uio_mf624: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-08 22:41:48 -08:00
uio_netx.c uio: uio_netx: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00
uio_pci_generic.c uio/uio_pci_generic: don't return zero on failure path in probe() 2015-01-12 05:04:12 -08:00
uio_pdrv_genirq.c Revert "uio: constify of_device_id array" 2015-04-03 16:04:21 +02:00
uio_pruss.c uio: pruss: add clk_disable() 2016-11-29 20:43:12 +01:00
uio_sercos3.c uio: uio_sercos3: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00