From patchwork Tue Jan 10 09:23:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 9506825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8EED5606E1 for ; Tue, 10 Jan 2017 09:24:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79DB2282DC for ; Tue, 10 Jan 2017 09:24:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CA9128461; Tue, 10 Jan 2017 09:24:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB5F5282DC for ; Tue, 10 Jan 2017 09:24:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758642AbdAJJYS (ORCPT ); Tue, 10 Jan 2017 04:24:18 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35008 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752941AbdAJJXt (ORCPT ); Tue, 10 Jan 2017 04:23:49 -0500 Received: by mail-pf0-f182.google.com with SMTP id f144so34969000pfa.2 for ; Tue, 10 Jan 2017 01:23:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=XuW1IU1GrtFBCJtnR+2ie15NOOVSSzlAUZAAt/zd3gA=; b=JGGC3wbbcJE3a3/gdX7zYC9xLlhdy0jSPOEvcKKYBymY1SowH81glkcmXXvc83l+pq 8uya2n/e3A6YCRIdEFjMLMmFjabrKQFfNXzlnx5EBKMObOZ+A7pB0xk3Q7UnpkwyjPeN f7uJhPeg1tfpJo/rpTUQSWIskHjNYCV3gHbQQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XuW1IU1GrtFBCJtnR+2ie15NOOVSSzlAUZAAt/zd3gA=; b=Qk/+DdUbg9p1ueTWOqaYQChwC5DufzY04LuaQlgB0QsiWB2489AH2TUTjzDYflK3xh gR9JPFCxobTJMWLfWFcM/FWZQeuf0y6JqaBTIDwlwDNWZqMd42v/fbS72YpuiPdSvhQh ddaUQnJrBvEzO6Gl1jSSeHfIXd+9rU1/TA3xxG09TRcyC9LbgZzcM7T2+KX2znSBHAA+ uvWLjsz0p2V0woiDtqIzOvmofG1Jv5KDAEGGpG9g16t65L4thml/pl1w/3gtXTfqjCT+ bFXlfar+nkbsA1se6JFZsuI1OuTdte0YuSdkwTIoq9vjUtG9KMmer7RRKuNHgyXGMgk8 DY7A== X-Gm-Message-State: AIkVDXIN9uh95d3hfNKLh1wRNMbaTQW98vMagQfN0aEJnNGnkwpozS3oQlzQiYhrZfJUOWad X-Received: by 10.98.201.135 with SMTP id l7mr2626841pfk.67.1484040228907; Tue, 10 Jan 2017 01:23:48 -0800 (PST) Received: from localhost.localdomain (61-216-166-214.HINET-IP.hinet.net. [61.216.166.214]) by smtp.gmail.com with ESMTPSA id t15sm3790030pgn.18.2017.01.10.01.23.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 01:23:48 -0800 (PST) From: Jun Nie To: xie.baoyou@zte.com.cn, vinod.koul@intel.com, dmaengine@vger.kernel.org Cc: shawn.guo@linaro.org, jason.liu@linaro.org, Jun Nie Subject: [PATCH] dmaengine: zx: fix build warning Date: Tue, 10 Jan 2017 17:23:40 +0800 Message-Id: <1484040220-11517-1-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix build warning that related to PAGE_SIZE. The maximum DMA length has nothing to do with PAGE_SIZE, just use a fix number for the definition. drivers/dma/zx_dma.c: In function 'zx_dma_prep_memcpy': drivers/dma/zx_dma.c:523:8: warning: division by zero [-Wdiv-by-zero] drivers/dma/zx_dma.c: In function 'zx_dma_prep_slave_sg': drivers/dma/zx_dma.c:567:11: warning: division by zero [-Wdiv-by-zero] Signed-off-by: Jun Nie Tested-by: Shawn Guo --- drivers/dma/zx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c index 42ff3e6..2bb6953 100644 --- a/drivers/dma/zx_dma.c +++ b/drivers/dma/zx_dma.c @@ -26,7 +26,7 @@ #define DRIVER_NAME "zx-dma" #define DMA_ALIGN 4 -#define DMA_MAX_SIZE (0x10000 - PAGE_SIZE) +#define DMA_MAX_SIZE (0x10000 - 512) #define LLI_BLOCK_SIZE (4 * PAGE_SIZE) #define REG_ZX_SRC_ADDR 0x00