Type of iterator was promoted to unsigned long in 64bit systems.
*header is small structure so it is alwas safe to cast return value
of sizeof operator to int.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
default:
DRM_ERROR("bad packet3 type %i at byte %d\n",
header.packet3.packet,
- cmdbuf->buffer->iterator - sizeof(header));
+ cmdbuf->buffer->iterator - (int)sizeof(header));
return -EINVAL;
}
default:
DRM_ERROR("bad cmd_type %i at byte %d\n",
header->header.cmd_type,
- cmdbuf->buffer->iterator - sizeof(*header));
+ cmdbuf->buffer->iterator - (int)sizeof(*header));
ret = -EINVAL;
goto cleanup;
}