From patchwork Tue Feb 20 11:55:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10229915 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 A2FE1602A7 for ; Tue, 20 Feb 2018 12:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92FCD285DC for ; Tue, 20 Feb 2018 12:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8781B28649; Tue, 20 Feb 2018 12:04:13 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 0542B285DC for ; Tue, 20 Feb 2018 12:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752053AbeBTMDq (ORCPT ); Tue, 20 Feb 2018 07:03:46 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:59271 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbeBTL7q (ORCPT ); Tue, 20 Feb 2018 06:59:46 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LzJj7-1ekEkD0Jhx-014XP2; Tue, 20 Feb 2018 12:59:36 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Jun Nie , Vinod Koul , Arnd Bergmann , Dan Williams , Shawn Guo , Sasha Levin , dmaengine@vger.kernel.org Subject: [4.4-stable 16/22] dmaengine: zx: fix build warning Date: Tue, 20 Feb 2018 12:55:03 +0100 Message-Id: <20180220115527.1806578-17-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:tc+AkfOPIj+mbEMAmdIVXHozh5l7Chf65N3urJFqVsks5T7RYDh +cED9PmjxbruYoGzjmlEw6dM9fRafibBqI/6zsGpjFmWI/HUeWrA1seiHns2YjHUpIEWTBM dnrKI1MxCUDG1EebyHzKeEGOza58KP5an265IRrI/0TQ4m/8SPZz0FwYZFaVasnHvxEUAQ1 fPisZh1ernhpvFdior7Kg== X-UI-Out-Filterresults: notjunk:1; V01:K0:A27fwyVOJN4=:pGHD7iCr1oftl9xxeLztwu WfCkVPzeRKFZuhidyIDrn0ln3aYZa57G8RlITvXCYbEwk5RH/iu4Xj/fgBk+7lXhLD1XSpZC7 NYCaFmg6pSV0gYM0p8AR9uSdxJqp6lUelhevyl1S0s9AG9w/0x5iS+Q2481LUq68tEQjmA37A MA3BtD2sclVLSTiwD/TVGt1mKnDTIcMFi/FfWgj/PSBDBDQxpdpYuAu5PC1QyuTw2etxWHKxc 5l/lWzvWpW8HEA0Ynuq6xgcpVdDguo9Iwkr+cOM4n/DpuPc36jsKvCd+md+l6TA2J/ug+9uTS 7Dx3GNkwy+qLH8FLyRVt/K/ZWjI1veC8RUSoU4l2ng+f8l+rcTGxMFB2MGuG1bOKUKrcM5Ht0 Ht0b7Gc2tuG2oxJoMNGQzQiZBu42LIBKVTv5YeBc4xt6Be5CPjbct2P0g3oYC7s0ND6hZNn3d YDqAbdSsD6t0+oiiZIJII8jg/inZTe5AFwgIMa6Txxwso6Mddndv3PHXK3PW64UxUuJJWPvWF vvi8KG/NkztRzG8ZgiFOfap9tNp/ssiuyLnifrkJE1Z0MFosRIpyleUFvGCi2TySrekdnWXxx SWaaNPOg0CM1f1YAgl6vvC09fEOTnbaonfKR1w7AoZIpDTsoxqvyAf/2UDAofoM3i6em6+X/p pJh1HwCnXbNuCZpi7g71fVqXBKtMlQ7xSbNx0QgnlmUDXaI8CYIEzrybdFcIiOAv+og6cOZ27 mkMhBWRLov1ucLcKU/g/NbNjpwFv1vjB19DoKA== Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jun Nie commit 067fdeb2f391bfa071f741a2b3eb74b8ff3785cd upstream. 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 Signed-off-by: Vinod Koul [arnd: rebased to 4.4-stable] Signed-off-by: Arnd Bergmann --- drivers/dma/zx296702_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c index 6059d81e701a..8e55403847b2 100644 --- a/drivers/dma/zx296702_dma.c +++ b/drivers/dma/zx296702_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