Skip to content

Commit

Permalink
media: rkisp1: stats: remove a wrong cast to u8
Browse files Browse the repository at this point in the history
hist_bins is an array of type __u32. Each entry represent
a 20 bit fixed point value as documented inline.
The cast to u8 when setting the values is wrong. Remove it.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Dafna Hirschfeld authored and Mauro Carvalho Chehab committed Jan 28, 2021
1 parent 31f190e commit a76f8dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/platform/rockchip/rkisp1/rkisp1-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ static void rkisp1_stats_get_hst_meas(struct rkisp1_stats *stats,
pbuf->meas_type |= RKISP1_CIF_ISP_STAT_HIST;
for (i = 0; i < RKISP1_CIF_ISP_HIST_BIN_N_MAX; i++)
pbuf->params.hist.hist_bins[i] =
(u8)rkisp1_read(rkisp1,
RKISP1_CIF_ISP_HIST_BIN_0 + i * 4);
rkisp1_read(rkisp1, RKISP1_CIF_ISP_HIST_BIN_0 + i * 4);
}

static void rkisp1_stats_get_bls_meas(struct rkisp1_stats *stats,
Expand Down

0 comments on commit a76f8dc

Please sign in to comment.