summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-01 21:07:53 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-01 21:10:05 (GMT)
commitef69ee1bc2c10fd1c5b389258d8156f3c38bdb33 (patch)
treea5c80cbea5086ebfee9f72b1905e13f44da6192a /drivers
parentca739eb086155007d7264be7ccc07f894d5a7bbe (diff)
downloadlinux-ef69ee1bc2c10fd1c5b389258d8156f3c38bdb33.tar.xz
[media] media-entity.c: get rid of var length arrays
Fix those sparse warnings: drivers/media/media-entity.c:238:17: warning: Variable length array is used. drivers/media/media-entity.c:239:17: warning: Variable length array is used. That allows sparse and other code check tools to verify if the function is using more stack than allowed. It also solves a bad Kernel pratice of using var length arrays at the stack. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/media-entity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index 153a464..767fe55 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -235,8 +235,8 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
media_entity_graph_walk_start(&graph, entity);
while ((entity = media_entity_graph_walk_next(&graph))) {
- DECLARE_BITMAP(active, entity->num_pads);
- DECLARE_BITMAP(has_no_links, entity->num_pads);
+ DECLARE_BITMAP(active, MEDIA_ENTITY_MAX_PADS);
+ DECLARE_BITMAP(has_no_links, MEDIA_ENTITY_MAX_PADS);
unsigned int i;
entity->stream_count++;