From patchwork Fri Mar 18 14:21:11 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: 8620991 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 CE7DD9F6E1 for ; Fri, 18 Mar 2016 14:55:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1AD3B20303 for ; Fri, 18 Mar 2016 14:55:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54D90202E9 for ; Fri, 18 Mar 2016 14:55:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757314AbcCROzk (ORCPT ); Fri, 18 Mar 2016 10:55:40 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:63732 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbcCROzj (ORCPT ); Fri, 18 Mar 2016 10:55:39 -0400 Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:6b55:87da:4920:b782]) by smtp5-g21.free.fr (Postfix) with ESMTP id 75E88D48024; Fri, 18 Mar 2016 15:51:20 +0100 (CET) X-Mailbox-Line: From a25c76bc3c63afc311069366af4970b909d356ef Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Jean-Francois Moine Date: Fri, 18 Mar 2016 15:21:11 +0100 Subject: [PATCH v3 4/5] dmaengine: sun6i: Simplify some macros To: Vinod Koul , Maxime Ripard , Chen-Yu Tsai Cc: Jens Kuske , 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=-6.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 As the max burst and bus width values are now checked, there is no reason to check them again when setting the hardware registers. Signed-off-by: Jean-Francois Moine --- drivers/dma/sun6i-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 3f73123..643ba4c 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -65,8 +65,8 @@ #define DMA_CHAN_CFG_SRC_DRQ(x) ((x) & 0x1f) #define DMA_CHAN_CFG_SRC_IO_MODE BIT(5) #define DMA_CHAN_CFG_SRC_LINEAR_MODE (0 << 5) -#define DMA_CHAN_CFG_SRC_BURST(x) (((x) & 0x3) << 7) -#define DMA_CHAN_CFG_SRC_WIDTH(x) (((x) & 0x3) << 9) +#define DMA_CHAN_CFG_SRC_BURST(x) ((x) << 7) +#define DMA_CHAN_CFG_SRC_WIDTH(x) ((x) << 9) #define DMA_CHAN_CFG_DST_DRQ(x) (DMA_CHAN_CFG_SRC_DRQ(x) << 16) #define DMA_CHAN_CFG_DST_IO_MODE (DMA_CHAN_CFG_SRC_IO_MODE << 16)