staging: Android: vsoc: Fix a i386-randconfig warning.
authorAlistair Strachan <astrachan@google.com>
Thu, 3 May 2018 04:45:56 +0000 (21:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 May 2018 20:53:04 +0000 (13:53 -0700)
Fix "warning: cast to pointer from integer of different size" when
printing the region shm physical address. Use the %pa conversion
specifier and pass the resource by reference.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: Martijn Coenen <maco@android.com>
Cc: Greg Hartman <ghartman@google.com>
Cc: devel@driverdev.osuosl.org
Cc: kernel-team@android.com
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/vsoc.c

index 794137b7751fe9990c7f6ca4194b598985687ead..3e6e4af7d6a14b89a970a2aa701b39dc79f34e7b 100644 (file)
@@ -800,8 +800,8 @@ static int vsoc_probe_device(struct pci_dev *pdev,
        vsoc_dev.shm_phys_start = pci_resource_start(pdev, SHARED_MEMORY_BAR);
        vsoc_dev.shm_size = pci_resource_len(pdev, SHARED_MEMORY_BAR);
 
-       dev_info(&pdev->dev, "shared memory @ DMA %p size=0x%zx\n",
-                (void *)vsoc_dev.shm_phys_start, vsoc_dev.shm_size);
+       dev_info(&pdev->dev, "shared memory @ DMA %pa size=0x%zx\n",
+                &vsoc_dev.shm_phys_start, vsoc_dev.shm_size);
        vsoc_dev.kernel_mapped_shm = pci_iomap_wc(pdev, SHARED_MEMORY_BAR, 0);
        if (!vsoc_dev.kernel_mapped_shm) {
                dev_err(&vsoc_dev.dev->dev, "cannot iomap region\n");