From patchwork Fri Dec 11 13:34:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 7829851 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A184EBEEE1 for ; Fri, 11 Dec 2015 13:34:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D682F20524 for ; Fri, 11 Dec 2015 13:34:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B359A20483 for ; Fri, 11 Dec 2015 13:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788AbbLKNei (ORCPT ); Fri, 11 Dec 2015 08:34:38 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:51787 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbbLKNeb (ORCPT ); Fri, 11 Dec 2015 08:34:31 -0500 Received: from 179.186.108.20.dynamic.adsl.gvt.net.br ([179.186.108.20] helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1a7NqA-00035B-Gm; Fri, 11 Dec 2015 13:34:30 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.86) (envelope-from ) id 1a7Npw-0003He-BE; Fri, 11 Dec 2015 11:34:16 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 10/10] media_entity: get rid of an unused var Date: Fri, 11 Dec 2015 11:34:15 -0200 Message-Id: <95de6a57c077feeca7187eab18fc8d4025a8f238.1449840443.git.mchehab@osg.samsung.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > > > + if (rlink != link->reverse) { > > > + r++; > > > > The variable is incremented here but otherwise never used, you can remove it. Suggested-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- 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--;