Skip to content

Commit

Permalink
drm/vmwgfx: Fix compiler warning with 32-bit dma_addr_t
Browse files Browse the repository at this point in the history
When the size of dma_addr_t was 32 bits, the compiler warned
about the size of the 32 bit shift being larger than the size
of the data type.

Reported by Intel's kbuild robot.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
  • Loading branch information
Thomas Hellstrom committed Aug 5, 2015
1 parent b9eb1a6 commit 2e3cc8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,12 @@ static int vmw_cmdbuf_header_submit(struct vmw_cmdbuf_header *header)
struct vmw_cmdbuf_man *man = header->man;
u32 val;

val = (header->handle >> 32);
if (sizeof(header->handle) > 4)
val = (header->handle >> 32);
else
val = 0;
vmw_write(man->dev_priv, SVGA_REG_COMMAND_HIGH, val);

val = (header->handle & 0xFFFFFFFFULL);
val |= header->cb_context & SVGA_CB_CONTEXT_MASK;
vmw_write(man->dev_priv, SVGA_REG_COMMAND_LOW, val);
Expand Down

0 comments on commit 2e3cc8c

Please sign in to comment.