Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3367884img; Mon, 25 Mar 2019 08:54:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqysdJ/0Vk5Gk8vQLsXiHxkI0qLqMMelniQvq2WwvnDuRXuz3ez7Gx5i22eQpbuYMH7V+lGN X-Received: by 2002:a17:902:8e82:: with SMTP id bg2mr26195863plb.217.1553529276694; Mon, 25 Mar 2019 08:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553529276; cv=none; d=google.com; s=arc-20160816; b=pkBihQ4UE7XZH8unQkUw38/eHmmriB/muOZQdoKJAFZu0i0prm+nd2hyUoNkk6Smzq ZlWfwmEJzduZb2hiWvQi5gyyXp4J/9ax6oZHz4tCw6mHfmiPDMUUx3EDLeIAXJaXnJO4 4NwRzfSY+EoUgV6cotMjoF4t5KkBWdmJCZdPIh4m7zQsBOIbwf2KRF/0PlxQVR1dXjOz Urivu+5bT3s2vpDmvqpqt3vpXDnnVwSbrCnFl9nR6C7iwo8D26SO/bCavJTyK+bctKSX cLpV5zwAlBvW5H15x7UHYyGf1Wz8UdnupSGeoE2P7Zq0Uq34icU9vXKTQ9ZgdlPOQA5T kbYw== 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 d2si14569299pls.325.2019.03.25.08.54.20; Mon, 25 Mar 2019 08:54:36 -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 S1729571AbfCYPvp (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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(-) 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, }, }; -- 2.20.0