[PATCH 10/15] dmaengine: pl330: Remove uneccessary ccr validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <lars@xxxxxxxxxx>
---
 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;
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux