Skip to content

Commit

Permalink
media: fimc-capture: get rid of two warnings
Browse files Browse the repository at this point in the history
Smatch produces two warnings when building this file:
	./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue
	./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue

On some asm instructions.

I suspect that those asm instructions might not be producing the
right code, so, better to use two intermediate vars, get rid of
the warnings and of the risk of producing a wrong code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Mauro Carvalho Chehab committed Mar 23, 2018
1 parent 0d2a531 commit 6ccd228
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/media/platform/exynos4-is/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,13 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx,
return;
}
if (target == V4L2_SEL_TGT_COMPOSE) {
u32 tmp_min_h = ffs(sink->width) - 3;
u32 tmp_min_v = ffs(sink->height) - 1;

if (ctx->rotation != 90 && ctx->rotation != 270)
align_h = 1;
max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3));
max_sc_v = min(SCALER_MAX_VRATIO, 1 << (ffs(sink->height) - 1));
max_sc_h = min(SCALER_MAX_HRATIO, 1 << tmp_min_h);
max_sc_v = min(SCALER_MAX_VRATIO, 1 << tmp_min_v);
min_sz = var->min_out_pixsize;
} else {
u32 depth = fimc_get_format_depth(sink->fmt);
Expand Down

0 comments on commit 6ccd228

Please sign in to comment.