From patchwork Thu Apr 28 15:09:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 8972101 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 53CD29F39D for ; Thu, 28 Apr 2016 15:31:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 960B920274 for ; Thu, 28 Apr 2016 15:31:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD5CE20259 for ; Thu, 28 Apr 2016 15:31:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878AbcD1PbV (ORCPT ); Thu, 28 Apr 2016 11:31:21 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:9388 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbcD1PbV (ORCPT ); Thu, 28 Apr 2016 11:31:21 -0400 Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:6b55:87da:4920:b782]) by smtp5-g21.free.fr (Postfix) with ESMTP id E0F4C5FFC8; Thu, 28 Apr 2016 13:30:01 +0200 (CEST) X-Mailbox-Line: From 863fcb55cd4c528f589b80307a9b76b0a7e1b64f Mon Sep 17 00:00:00 2001 Message-Id: <863fcb55cd4c528f589b80307a9b76b0a7e1b64f.1461856751.git.moinejf@free.fr> In-Reply-To: References: From: Jean-Francois Moine Date: Thu, 28 Apr 2016 17:09:14 +0200 Subject: [PATCH v6 2/3] dmaengine: sun6i: Remove useless check To: Vinod Koul , Maxime Ripard , Chen-Yu Tsai Cc: linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The transfer direction is now checked in set_config. There is no need to check it twice. Signed-off-by: Jean-Francois Moine --- drivers/dma/sun6i-dma.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index cd436c6..80e426d 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -585,11 +585,6 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg( if (!sgl) return NULL; - if (!is_slave_direction(dir)) { - dev_err(chan2dev(chan), "Invalid DMA direction\n"); - return NULL; - } - ret = set_config(sdev, sconfig, dir, &lli_cfg); if (ret) { dev_err(chan2dev(chan), "Invalid DMA configuration\n");