提交 fc5004e5 编写于 作者: C Colin Ian King 提交者: Mauro Carvalho Chehab

media: v4l2-ctrls: make array range static

Don't populate the read-only array range on the stack but
instead it static. Also makes the object code a little smaller.
Signed-off-by: NColin Ian King <colin.i.king@gmail.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 2bea8388
...@@ -382,7 +382,7 @@ validate_vp9_seg_params(struct v4l2_vp9_segmentation *seg) ...@@ -382,7 +382,7 @@ validate_vp9_seg_params(struct v4l2_vp9_segmentation *seg)
} }
for (i = 0; i < ARRAY_SIZE(seg->feature_data); i++) { for (i = 0; i < ARRAY_SIZE(seg->feature_data); i++) {
const int range[] = { 255, 63, 3, 0 }; static const int range[] = { 255, 63, 3, 0 };
for (j = 0; j < ARRAY_SIZE(seg->feature_data[j]); j++) { for (j = 0; j < ARRAY_SIZE(seg->feature_data[j]); j++) {
if (seg->feature_data[i][j] < -range[j] || if (seg->feature_data[i][j] < -range[j] ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册