stream_address = smfc_hwconfigure_jpeg_base(ctx, &vb2buf_jpg->vb2_buf,
ctx->offset_of_sos, false);
if (!(ctx->flags & SMFC_CTX_COMPRESS)) {
- u32 streamsize = vb2_plane_size(&vb2buf_jpg->vb2_buf, 0);
+ u32 streamsize = (u32)vb2_plane_size(&vb2buf_jpg->vb2_buf, 0);
streamsize -= ctx->offset_of_sos;
streamsize += stream_address & SMFC_ADDR_ALIGN_MASK(burstlen);
table = dc ? ctx->huffman_tables->dc[tcth & 1].value
: ctx->huffman_tables->ac[tcth & 1].value;
ret = copy_from_user(table, pcursor, num_values);
- pcursor += num_values;
+ pcursor += (unsigned long)num_values;
if (ret) {
dev_err(ctx->smfc->dev,
"Failed to read huffval of %d,%d\n",
ret = copy_from_user(ctx->quantizer_tables->table[pqtq],
pcursor, SMFC_MCU_SIZE);
- pcursor += SMFC_MCU_SIZE;
+ pcursor += (unsigned long)SMFC_MCU_SIZE;
if (ret) {
dev_err(ctx->smfc->dev,
"Failed to read %dth Q-Table\n", pqtq);
pos = sos;
- ctx->offset_of_sos = *cursor - streambase - SMFC_JPEG_MARKER_LEN;
+ ctx->offset_of_sos = (unsigned int)(*cursor - streambase - SMFC_JPEG_MARKER_LEN);
ret = copy_from_user(sos, (void __user *)*cursor, sizeof(sos));
if (ret) {