From patchwork Wed Aug 27 13:52:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4788501 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B21339F383 for ; Wed, 27 Aug 2014 13:55:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8425A2015A for ; Wed, 27 Aug 2014 13:55:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5287A20123 for ; Wed, 27 Aug 2014 13:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934707AbaH0Nz2 (ORCPT ); Wed, 27 Aug 2014 09:55:28 -0400 Received: from top.free-electrons.com ([176.31.233.9]:52397 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934703AbaH0Nz2 (ORCPT ); Wed, 27 Aug 2014 09:55:28 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 4CBC5700; Wed, 27 Aug 2014 15:55:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost.localdomain (unknown [190.2.108.81]) by mail.free-electrons.com (Postfix) with ESMTPSA id 6D72C777; Wed, 27 Aug 2014 15:54:53 +0200 (CEST) From: Ezequiel Garcia To: , Vinod Koul Cc: Thomas Petazzoni , Gregory Clement , Lior Amsalem , Tawfik Bayouk , Ezequiel Garcia Subject: [PATCH 6/7] dma: mv_xor: Remove dead code Date: Wed, 27 Aug 2014 10:52:54 -0300 Message-Id: <1409147575-4860-7-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1409147575-4860-1-git-send-email-ezequiel.garcia@free-electrons.com> References: <1409147575-4860-1-git-send-email-ezequiel.garcia@free-electrons.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver currently defines the USE_TIMER macro, but the timer-feature is never used in the code. The XOR and CRC32 results are never used. The 'unmap_xxx' fields are no longer needed, they were made obsolete in commit: 54f8d501e842 dmaengine: remove DMA unmap from drivers. Let's remove all this dead code. Signed-off-by: Ezequiel Garcia --- drivers/dma/mv_xor.c | 2 -- drivers/dma/mv_xor.h | 20 -------------------- 2 files changed, 22 deletions(-) diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index cbc90e5..744a007 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -517,8 +517,6 @@ mv_xor_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src, sw_desc->type = DMA_XOR; sw_desc->async_tx.flags = flags; mv_desc_init(sw_desc, dest, len, flags); - sw_desc->unmap_src_cnt = src_cnt; - sw_desc->unmap_len = len; while (src_cnt--) mv_desc_set_src_addr(sw_desc, src_cnt, src[src_cnt]); } diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index 21b0828..de40036 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h @@ -23,7 +23,6 @@ #include #include -#define USE_TIMER #define MV_XOR_POOL_SIZE PAGE_SIZE #define MV_XOR_SLOT_SIZE 64 #define MV_XOR_THRESHOLD 1 @@ -117,10 +116,6 @@ struct mv_xor_chan { struct list_head all_slots; int slots_allocated; struct tasklet_struct irq_tasklet; -#ifdef USE_TIMER - unsigned long cleanup_time; - u32 current_on_last_cleanup; -#endif }; /** @@ -132,12 +127,8 @@ struct mv_xor_chan { * @phys: hardware address of the hardware descriptor chain * @slot_used: slot in use or not * @idx: pool index - * @unmap_src_cnt: number of xor sources - * @unmap_len: transaction bytecount * @tx_list: list of slots that make up a multi-descriptor transaction * @async_tx: support for the async_tx api - * @xor_check_result: result of zero sum - * @crc32_result: result crc calculation */ struct mv_xor_desc_slot { struct list_head slot_node; @@ -147,18 +138,7 @@ struct mv_xor_desc_slot { void *hw_desc; u16 slot_used; u16 idx; - u16 unmap_src_cnt; - u32 value; - size_t unmap_len; struct dma_async_tx_descriptor async_tx; - union { - u32 *xor_check_result; - u32 *crc32_result; - }; -#ifdef USE_TIMER - unsigned long arrival_time; - struct timer_list timeout; -#endif }; /*