From patchwork Sun Nov 8 07:45:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7577311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9ADDE9F2F7 for ; Sun, 8 Nov 2015 07:48:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C13BB205CB for ; Sun, 8 Nov 2015 07:48:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0433205C1 for ; Sun, 8 Nov 2015 07:48:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZvKfm-0004sT-83; Sun, 08 Nov 2015 07:45:58 +0000 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZvKfi-0004qM-ON for linux-arm-kernel@lists.infradead.org; Sun, 08 Nov 2015 07:45:55 +0000 X-IronPort-AV: E=Sophos;i="5.20,261,1444687200"; d="scan'208";a="186582887" Received: from 203-7.98.82.ozone.net (HELO hadrien.local) ([82.98.7.203]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Nov 2015 08:45:27 +0100 Date: Sun, 8 Nov 2015 08:45:26 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Sinan Kaya Subject: [PATCH] dma: fix returnvar.cocci warnings Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151107_234555_128085_D82292BF X-CRM114-Status: GOOD ( 13.03 ) X-Spam-Score: -6.1 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Mark Rutland , Pawel Moll , Ian Campbell , Vinod Koul , jcm@redhat.com, timur@codeaurora.org, Kumar Gala , linux-kernel@vger.kernel.org, Sinan Kaya , devicetree@vger.kernel.org, Rob Herring , cov@codeaurora.org, agross@codeaurora.org, dmaengine@vger.kernel.org, Dan Williams , linux-arm-msm@vger.kernel.org, kbuild-all@01.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Sinan Kaya Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- hidma_ll.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/dma/qcom/hidma_ll.c +++ b/drivers/dma/qcom/hidma_ll.c @@ -567,14 +567,13 @@ int hidma_ll_resume(struct hidma_lldev * static int hidma_ll_hw_start(struct hidma_lldev *lldev) { - int rc = 0; unsigned long irqflags; spin_lock_irqsave(&lldev->lock, irqflags); writel(lldev->tre_write_offset, lldev->trca + TRCA_DOORBELL_OFFSET); spin_unlock_irqrestore(&lldev->lock, irqflags); - return rc; + return 0; } bool hidma_ll_isenabled(struct hidma_lldev *lldev) @@ -600,7 +599,6 @@ bool hidma_ll_isenabled(struct hidma_lld int hidma_ll_queue_request(struct hidma_lldev *lldev, u32 tre_ch) { struct hidma_tre *tre; - int rc = 0; unsigned long flags; tre = &lldev->trepool[tre_ch]; @@ -618,7 +616,7 @@ int hidma_ll_queue_request(struct hidma_ lldev->tre_write_offset = (lldev->tre_write_offset + TRE_SIZE) % lldev->tre_ring_size; spin_unlock_irqrestore(&lldev->lock, flags); - return rc; + return 0; } int hidma_ll_start(struct hidma_lldev *lldev)