From patchwork Sun Jul 6 18:32:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 4490851 X-Patchwork-Delegate: vinod.koul@intel.com 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 B51C39F390 for ; Sun, 6 Jul 2014 18:32:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC855202EC for ; Sun, 6 Jul 2014 18:32:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 195E420219 for ; Sun, 6 Jul 2014 18:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbaGFScr (ORCPT ); Sun, 6 Jul 2014 14:32:47 -0400 Received: from smtp-out-155.synserver.de ([212.40.185.155]:1287 "EHLO smtp-out-155.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752382AbaGFScq (ORCPT ); Sun, 6 Jul 2014 14:32:46 -0400 Received: (qmail 12982 invoked by uid 0); 6 Jul 2014 18:32:45 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 12384 Received: from ppp-46-244-166-46.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [46.244.166.46] by 217.119.54.73 with SMTP; 6 Jul 2014 18:32:44 -0000 From: Lars-Peter Clausen To: Vinod Koul , Dan Williams Cc: Boojin Kim , dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 10/15] dmaengine: pl330: Remove uneccessary ccr validation Date: Sun, 6 Jul 2014 20:32:27 +0200 Message-Id: <1404671552-502-11-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1404671552-502-1-git-send-email-lars@metafoo.de> References: <1404671552-502-1-git-send-email-lars@metafoo.de> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, 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 We know that we do not create invalid ccr settings in this driver. There is no need to validate them. Signed-off-by: Lars-Peter Clausen --- drivers/dma/pl330.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index f0e9f47..0209823 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1420,21 +1420,6 @@ static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc) return ccr; } -static inline bool _is_valid(u32 ccr) -{ - enum pl330_cachectrl dcctl; - enum pl330_cachectrl scctl; - - dcctl = (ccr >> CC_DSTCCTRL_SHFT) & CC_DRCCCTRL_MASK; - scctl = (ccr >> CC_SRCCCTRL_SHFT) & CC_SRCCCTRL_MASK; - - if (dcctl == INVALID1 || dcctl == INVALID2 - || scctl == INVALID1 || scctl == INVALID2) - return false; - else - return true; -} - /* * Submit a list of xfers after which the client wants notification. * Client is not notified after each xfer unit, just once after all @@ -1495,14 +1480,6 @@ static int pl330_submit_req(struct pl330_thread *thrd, struct pl330_req *r) ccr = readl(regs + CC(thrd->id)); } - /* If this req doesn't have valid xfer settings */ - if (!_is_valid(ccr)) { - ret = -EINVAL; - dev_info(thrd->dmac->pinfo->dev, "%s:%d Invalid CCR(%x)!\n", - __func__, __LINE__, ccr); - goto xfer_exit; - } - idx = IS_FREE(&thrd->req[0]) ? 0 : 1; xs.ccr = ccr;