From patchwork Mon Mar 25 15:50:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161134 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4127534jan; Mon, 25 Mar 2019 08:51:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPbR6vJGpamgv/as2O/jfM1rsVZlZMU55OnKx1b+B6u0IdocpTIygVr/0i7ZUeBQBt7Re/ X-Received: by 2002:a62:2c91:: with SMTP id s139mr24837140pfs.196.1553529087980; Mon, 25 Mar 2019 08:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553529087; cv=none; d=google.com; s=arc-20160816; b=lV8UmGdXBthhSt9vHGsP/356gydXxKam0I6MzhgWUtpft4WwpRHNjiHdqrNWZQyW/w BiJweQzw7BT2pWsee1odlkYq+NO+98bQpHLsfxKhpwPEqLA2yGTY+wKuKufTH30CYAyA ROmDbJUeIS3QTPfKwVa7sI74fpz9hUcC8fIMIzbqq/RCBVjZDMVG46rnTWC4bwZxWFR8 VjA/NgQdsgYZpb6/uEN3+NwegBw/5mjCSDoJKmnxksMcTaEjaMpxKsHbUA3xc9UfjDT8 xt32Tk8TqSDz8a72hZEKHMWRR2cDL3GrRcgGCcHkT6e4WSxgQs4Iezm0EbisLlHkCA2h V58Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pvvKEYNJUQ0vOkwzkTTy5/JMDWoy4lRbPw7eOztV05E=; b=UrqpzAAaAaHGuHDAs6jqxBb1nSnwDwYZQJci3w9X4NYZuDkwizYjF84GJAZTPZsrMF CIEg2DiMXVKjZQwfClCI/6Z+tMRv2Xq2ZAA3Nu5n1bqPj/Kb8SxZ0jNXmEbGDTP2EgtN bRjA5UglqC4Wj+397U/ewwjtp3wc12EivLebe12T6D1/NhF7RzcEVQQLUoWXqejx9wlz dRqDhuoz3AoxADICN1B+1JUCLCsOQy4bUiVnsQPM3qt7pN7V2MD8YwAy156vaLq+fm6P cYzLf4TxL6J0Mvv3dpletQddXRaqtrBJ4hCc5fDWq9TMrDKlaJOHbjNIJhe0DtSXIuhU JvOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 97si14919076plb.407.2019.03.25.08.51.27; Mon, 25 Mar 2019 08:51:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729529AbfCYPvZ (ORCPT + 31 others); Mon, 25 Mar 2019 11:51:25 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:43903 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729106AbfCYPvX (ORCPT ); Mon, 25 Mar 2019 11:51:23 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MfHMj-1gTJdc1nn1-00glfR; Mon, 25 Mar 2019 16:51:03 +0100 From: Arnd Bergmann To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , arm@kernel.org, Arnd Bergmann , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ARM: orion: don't use using 64-bit DMA masks Date: Mon, 25 Mar 2019 16:50:42 +0100 Message-Id: <20190325155101.3544731-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:COBMlKzTRvZ6y/b9fWVlle7Lr1pZJQdoRG82Gy4ic7tc+JYEdfn /da8hPKxn/piF3r0wUar3rQRg6d16Mbg3KZD3g7TPYyLk36tMx9u3DqngiCRK6yAYn//T01 e1k7l/Md2szJDSPbmKO8xvjX7jNpaqTI8xUOuW2kLAMp+w0oyYzMIVmMtSFhY9CkYJQPrRC Ha178RlaBaCsQmVaFTKvA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:1BYFSPewexA=:lbtFuhNoThCFslHT2j2Qxs rmsSsH5KRbTR8s0QS2Cy3ivO5ofrsvdnU9VdCdC5ERoXwWySgHXJ0Eo2WHDDRYThjsMKgakaf IdcGNcxj0EbKxP7JMG3pqnfwujTu0JXO4ExqynEznkHLEx6ttA29emsXLklJW0eVhEIoVREeW 33E6//mPo3pe/Nkbx4KwFH7pLt74dnVZemXHkOkbm1SvL2PkS0G0wmLDNPt1blxtXO37/exhK 4y8/O+jAR+9fRYn3OgCNfo3u3ZLD2I5G/MjYZjfzK3GEctIoZYVZuakg9TqZozjclWkGKYhmc +meD0xDK0RsmLbXSX3ORtJSSuWMYXa5osChbmdw1Cfk9iyNfd8PNF8erBEtUPE8aFsgpR3KHi gnQaSFfoMHzOi9KDmrfyR9QCpkC/cRgyMhPk1g0eTtfKmtfKQskTF5Yg8qaDFWNvcR1dtHwJl +8XUX03FTiHE39psKoQ1BVogAmAdxG5cCljgTFs59c602kcjcuMd1wS3FBoIZ2+jxx7A8leo1 sl3rlkyWH3jJa4Yy+6y6exdZh3Xb2NOGv5V2H726N8+/iObKDPIlvIB3PUGBzwJx6z9q/v7Bm h+mbmYH+Sasi7SwEYNKxrEJ9rUJjt2TgzBxYm2gkJGScRAs0hkdpLhyKJ/PxrlZpS3gRtSAwS uNcE499E10ZkNc3K8bUXtXRluuOZo5jmUxkLLbHubprBFhC6ct8V3Ukd/D+Pfg4ijaE/BpU5G UGCB96aZNy6XFhv39qM2YJv9BMJAKLAD7OOoYg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_mask = DMA_BIT_MASK(64), ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:141:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) The ones in orion shouldn't really be 64 bit masks, so changing them to what the driver can support avoids the warning. Signed-off-by: Arnd Bergmann --- arch/arm/plat-orion/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index a6c81ce00f52..8647cb80a93b 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -622,7 +622,7 @@ static struct platform_device orion_xor0_shared = { .resource = orion_xor0_shared_resources, .dev = { .dma_mask = &orion_xor_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &orion_xor0_pdata, }, }; @@ -683,7 +683,7 @@ static struct platform_device orion_xor1_shared = { .resource = orion_xor1_shared_resources, .dev = { .dma_mask = &orion_xor_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &orion_xor1_pdata, }, }; From patchwork Mon Mar 25 15:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161135 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4127833jan; Mon, 25 Mar 2019 08:51:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrWQ5bZnrKtd7YltdY8kjW9aep95YajTWIPqv14diICLqFNN66mely/sOA/khY8r0dvS6b X-Received: by 2002:a62:1318:: with SMTP id b24mr22170950pfj.201.1553529107265; Mon, 25 Mar 2019 08:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553529107; cv=none; d=google.com; s=arc-20160816; b=JaIRTiwXgbtnpDtdUtorSAbAEDDq1DvyUTDG7LK9dsw/WQc3yvK2H6NdkiFfG9RXQC 47mmWfw+Wwv7DMsB1q7iBZuBaReB3FvLuXOMv8U8bZvWNPh4aWDWJa4F6p3wQZP57GqA dY6Ncxcz4APcHKxAWPKwf7q9zvvZ/Tqa0929rygwRaSLnO+emdbtLevBKCHxQ50Sb//u To9JeVZnwM0Xiz+QVZF7jcicSlWdF4D4TTrJHtD4U2+iiaRCfmgQonqZtkKAwV9py+8S IDD7kKrlLlwYCLRwU5HsGaasuc5j3m4HtH4Gw8xmZty3avsQFwY207/UD8BmF8UrmW2Z 3Rcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=a1H58mFhoML87L1QG4Pqf59QM4RiWWXPuA9JHCxvH8c=; b=tk4jHxuU9IzahMpajCuSGz5FDW2hCP9AgtbSzGi4JkJfXtyZQ2iwPOLiHDFN8kxGvF IGroUzJsFUGiW/GEKiMJJDxbw9eeQCMQwfjCrncijN1NeOW4fwu422kvclEDtQV340q4 BoHcFt+9vX0/NlU2LLkjtr/UIQ59bqOQMsSuG6ybdcCvzszTOrwZ9e+7crVW2drJQ1yt Zn0IlnDwbYLrua0SXC1Dz5u2hVGr0zf/zZEsMCiFsp8+XCq3NIXRPh9mAhzhgbd9NXrR KBtDRyfgnyY2p8+y/iRX7FZgaw0rs5XIYGt/ajNWnaLQ+LYe3CuHGQlSDYvfXK+x7wSK uDJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 97si14919076plb.407.2019.03.25.08.51.46; Mon, 25 Mar 2019 08:51:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729582AbfCYPvp (ORCPT + 31 others); Mon, 25 Mar 2019 11:51:45 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:56519 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729106AbfCYPvp (ORCPT ); Mon, 25 Mar 2019 11:51:45 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MTzjI-1hZIRP1azK-00R4M0; Mon, 25 Mar 2019 16:51:29 +0100 From: Arnd Bergmann Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , arm@kernel.org, Arnd Bergmann , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: iop: don't use using 64-bit DMA masks Date: Mon, 25 Mar 2019 16:50:43 +0100 Message-Id: <20190325155101.3544731-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190325155101.3544731-1-arnd@arndb.de> References: <20190325155101.3544731-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Hv3LTYYLlNBnUJVUFqJpGCxxG4jl6evNSCupUx46HycKGBxmm7w MXPSMJfuEagKHZyuZ+35E29j2Zez4il1iWh8qxMH8zNMiMYAQXuDwRT43We+EOYj0HL+c74 n5Yg/h2MqoXjzZhF3D/+G9cNXkTjVh5NYCY7u7moY2+mhbFOAy9ksSpEgLGeGK5JGDR0nff ehFv4ZyWZFo3FIdBRqLTA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:fhkbTZq//L8=:EW4G0364E4EzR8fmxAy6iI 6n/KFiS0AZRP4gPKYbSvGpVM/e8lmFemCFlfExxCdv5kPiA0iCb7seHOIV7YCIDPjkuJnG4R9 sJ0MjU0ZI6UfBFge+yIfJsBDXSk9BtdYz3xQhEx22IwbJFIQ8VX9zsvk9V4ZAq8PBlqurUVoO mw2BNUNLgMkLvomLBH4UfuyktxW/tFhoYDkx72DRHQX43kGvBBGVO2oBAhuWAPLmdjVyrYfAv cPsJW4Zg+dW1cdMUbnCAEx9N02YZv34bNNqpaewoRrnwOEIIkhgQhlYBcFuxqAbc/ej9uv/HJ h5PYTpQJHMzlP8ffC9l+H6oG/JEtOWwGMlCaSVsoHj+YorLob85aBhS7Tpw5Xwdb4Qw+tQBzY fWiBBCBpxu71XP5qaOouaeLTp7Lm/UU+EfaSrcExh/X/HrXlUxlWLgPWGXTuzDAqBch2qAOI3 r7qYAEmJ13NPR2WS+EAbcx27Bq0oQEkMRcsn/UNqToVp2XtM6yzSJvdV0IwT29y8eL7WAcrjU lOWQmW2xrPInp2fuceaSrXc6HM46mml8Dj1V9U+etW8px5l89TSjISoQ+eyqhjza/JTS/M4he eT5J7H+JDurXWswJZo7nyVir4AkfrIOx9dsq28u95MUrozegE2z52uOBI04dD53DkkE4hl2x/ lp/ZCFLFkMEpQUDSzV7hMfnh1hTZXwdjHwit2C486uVGC6Yf79yVvmAPoiqPMVHLBkzaBLz9T z90UbpKk5unXIxQrsdgZPt+BAxILkG3jc6BGRA== To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64); ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:141:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ ~~~ The ones in iop shouldn't really be 64 bit masks, so changing them to what the driver can support avoids the warning. Signed-off-by: Arnd Bergmann --- iop and orion appear to be the only platforms declaring 64 bit masks statically. When they are fixed, we don't need to change the macro. --- arch/arm/mach-iop13xx/setup.c | 8 ++++---- arch/arm/mach-iop13xx/tpmi.c | 10 +++++----- arch/arm/plat-iop/adma.c | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) -- 2.20.0 diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index 53c316f7301e..fe4932fda01d 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c @@ -300,7 +300,7 @@ static struct resource iop13xx_adma_2_resources[] = { } }; -static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64); +static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(32); static struct iop_adma_platform_data iop13xx_adma_0_data = { .hw_id = 0, .pool_size = PAGE_SIZE, @@ -324,7 +324,7 @@ static struct platform_device iop13xx_adma_0_channel = { .resource = iop13xx_adma_0_resources, .dev = { .dma_mask = &iop13xx_adma_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *) &iop13xx_adma_0_data, }, }; @@ -336,7 +336,7 @@ static struct platform_device iop13xx_adma_1_channel = { .resource = iop13xx_adma_1_resources, .dev = { .dma_mask = &iop13xx_adma_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *) &iop13xx_adma_1_data, }, }; @@ -348,7 +348,7 @@ static struct platform_device iop13xx_adma_2_channel = { .resource = iop13xx_adma_2_resources, .dev = { .dma_mask = &iop13xx_adma_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *) &iop13xx_adma_2_data, }, }; diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c index db511ec2b1df..116feb6b261e 100644 --- a/arch/arm/mach-iop13xx/tpmi.c +++ b/arch/arm/mach-iop13xx/tpmi.c @@ -152,7 +152,7 @@ static struct resource iop13xx_tpmi_3_resources[] = { } }; -u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64); +u64 iop13xx_tpmi_mask = DMA_BIT_MASK(32); static struct platform_device iop13xx_tpmi_0_device = { .name = "iop-tpmi", .id = 0, @@ -160,7 +160,7 @@ static struct platform_device iop13xx_tpmi_0_device = { .resource = iop13xx_tpmi_0_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -171,7 +171,7 @@ static struct platform_device iop13xx_tpmi_1_device = { .resource = iop13xx_tpmi_1_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -182,7 +182,7 @@ static struct platform_device iop13xx_tpmi_2_device = { .resource = iop13xx_tpmi_2_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; @@ -193,7 +193,7 @@ static struct platform_device iop13xx_tpmi_3_device = { .resource = iop13xx_tpmi_3_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c index a4d1f8de3b5b..d9612221e484 100644 --- a/arch/arm/plat-iop/adma.c +++ b/arch/arm/plat-iop/adma.c @@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = { .resource = iop3xx_dma_0_resources, .dev = { .dma_mask = &iop3xx_adma_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *) &iop3xx_dma_0_data, }, }; @@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = { .resource = iop3xx_dma_1_resources, .dev = { .dma_mask = &iop3xx_adma_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *) &iop3xx_dma_1_data, }, }; @@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = { .resource = iop3xx_aau_resources, .dev = { .dma_mask = &iop3xx_adma_dmamask, - .coherent_dma_mask = DMA_BIT_MASK(64), + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = (void *) &iop3xx_aau_data, }, };