[PATCH 10/10] media_entity: get rid of an unused var

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > +		if (rlink != link->reverse) {
> > > +			r++;
> >
> > The variable is incremented here but otherwise never used, you can remove it.

Suggested-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>
---
 drivers/media/media-entity.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index 452af1d5a20d..57de11281af1 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -592,7 +592,6 @@ static void __media_entity_remove_link(struct media_entity *entity,
 {
 	struct media_link *rlink, *tmp;
 	struct media_entity *remote;
-	unsigned int r = 0;
 
 	if (link->source->entity == entity)
 		remote = link->sink->entity;
@@ -600,10 +599,8 @@ static void __media_entity_remove_link(struct media_entity *entity,
 		remote = link->source->entity;
 
 	list_for_each_entry_safe(rlink, tmp, &remote->links, list) {
-		if (rlink != link->reverse) {
-			r++;
+		if (rlink != link->reverse)
 			continue;
-		}
 
 		if (link->source->entity == entity)
 			remote->num_backlinks--;
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux