drm/qxl: fix build warnings on 32-bit
authorDave Airlie <airlied@redhat.com>
Fri, 31 May 2013 02:45:09 +0000 (12:45 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 31 May 2013 02:45:09 +0000 (12:45 +1000)
Just the usual printk related warnings.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/qxl/qxl_ioctl.c
drivers/gpu/drm/qxl/qxl_kms.c

index 6db7370373ea4782b3ccc85c9a31a732d907b66b..a4b71b25fa5366c948f8447e6c7b6f0808b4aab4 100644 (file)
@@ -151,7 +151,7 @@ static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
                struct qxl_bo *cmd_bo;
                int release_type;
                struct drm_qxl_command *commands =
-                       (struct drm_qxl_command *)execbuffer->commands;
+                       (struct drm_qxl_command *)(uintptr_t)execbuffer->commands;
 
                if (DRM_COPY_FROM_USER(&user_cmd, &commands[cmd_num],
                                       sizeof(user_cmd)))
@@ -193,7 +193,7 @@ static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
 
                for (i = 0 ; i < user_cmd.relocs_num; ++i) {
                        if (DRM_COPY_FROM_USER(&reloc,
-                                              &((struct drm_qxl_reloc *)user_cmd.relocs)[i],
+                                              &((struct drm_qxl_reloc *)(uintptr_t)user_cmd.relocs)[i],
                                               sizeof(reloc))) {
                                qxl_bo_list_unreserve(&reloc_list, true);
                                qxl_release_unreserve(qdev, release);
index 85127ed24cfd3481b72428b84cd54da5c12134dc..e27ce2a907cf798c7027c15abbd270d166ef9dfa 100644 (file)
@@ -128,12 +128,13 @@ int qxl_device_init(struct qxl_device *qdev,
 
        qdev->vram_mapping = io_mapping_create_wc(qdev->vram_base, pci_resource_len(pdev, 0));
        qdev->surface_mapping = io_mapping_create_wc(qdev->surfaceram_base, qdev->surfaceram_size);
-       DRM_DEBUG_KMS("qxl: vram %p-%p(%dM %dk), surface %p-%p(%dM %dk)\n",
-                (void *)qdev->vram_base, (void *)pci_resource_end(pdev, 0),
+       DRM_DEBUG_KMS("qxl: vram %llx-%llx(%dM %dk), surface %llx-%llx(%dM %dk)\n",
+                (unsigned long long)qdev->vram_base,
+                (unsigned long long)pci_resource_end(pdev, 0),
                 (int)pci_resource_len(pdev, 0) / 1024 / 1024,
                 (int)pci_resource_len(pdev, 0) / 1024,
-                (void *)qdev->surfaceram_base,
-                (void *)pci_resource_end(pdev, 1),
+                (unsigned long long)qdev->surfaceram_base,
+                (unsigned long long)pci_resource_end(pdev, 1),
                 (int)qdev->surfaceram_size / 1024 / 1024,
                 (int)qdev->surfaceram_size / 1024);