From patchwork Fri Jan 13 15:32:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9515889 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 E354760762 for ; Fri, 13 Jan 2017 15:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6E3C28584 for ; Fri, 13 Jan 2017 15:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBC8628606; Fri, 13 Jan 2017 15:34:31 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70DDC28584 for ; Fri, 13 Jan 2017 15:34:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cS3s3-0004kS-E6; Fri, 13 Jan 2017 15:34:27 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cS3ru-0004Ay-QX for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2017 15:34:21 +0000 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0M0H6r-1cidnw3PlV-00ubce; Fri, 13 Jan 2017 16:33:46 +0100 From: Arnd Bergmann To: Alexandre Belloni Subject: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro Date: Fri, 13 Jan 2017 16:32:53 +0100 Message-Id: <20170113153311.2611510-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170113153311.2611510-1-arnd@arndb.de> References: <20170113153311.2611510-1-arnd@arndb.de> X-Provags-ID: V03:K0:aleEdqv3SEtMuXAMEwQ1IBVk7yCuukY0q1O/X/GxnPBm4/5IdSY +QdSo9cQX+g34qdVIvfJQ4aISI9KZXusIOLLrtCyniYPZrZ42MafSk+X/oyFh7cr5maWHLq uv+JXu+EtZ55xNTD5x9Yj6kSSa/Hf6aBTsZ14M0VW8R7/vaNZUQSULTKDjHxAvw+J1DhGkx QbJuGV+lihmR1reN5DxtA== X-UI-Out-Filterresults: notjunk:1; V01:K0:p/uXWyXC3S0=:T4pwVwhUbiPgUieSNr4KlG zYs1SNvZaI7/nnU5oiGYlUOGkokrGPelXEcdJbe/ZtjfDyPdKh5N4bQn8VFci8jVGrOJn1Hof FwZVQbv+IquXcUXXCMXske/ePSWjX/f2NxfL0T7mb42SnKqpuDHoQk3Ctg/Da/qUl7b0NM0ji dKn9cWbx31FLCFsGcS96cWn7vugn5CcL7aDbQjqUL2S9/KFUs70ZOjPr6FlBR6FsLDVdxWY/6 fiFxXF1IvuYim5oTm3qB8IkC0m5gxl7aoduby/FUCuGwhCQaaJfgU7GKMuxLwHYSBwGpMzHr2 xel4lmKFgtIu4JoDGAn2slmgJbrytUcQWNvjRu6WgneybXRvPdagVOU4HvoHNua4jLNpllm+c Dkvu7u173A0+xZMZLUGQPxyzXaAYDrWyxHqxxRaZKB3B5owLiADnLLY+FyGR6pMoe3bmIn5iT XU5uY6G8QfkXJbMBzn15DMwcAMPBbtAqroItvmuJ1o/0ZzxnE83QrphqCFl3AD63niCU6+Qn9 btFzF0UYvyOWpQkIOkb6hug8cqHYGl8NTVz4AUOsLEGik4tHao9TOzmk9x5c5wxONbmpMqN/o 6U0ty8ScZ4K8m4+RekcgYuC1talHQnzZa8BC9Kj2hzpMX6LOC+gCN9sc0mqI7u2sz5DO82Wrm 3Y9h2pL9UXBXYldny3BVBTHVo/jlhtgGORPVZosnbD2wZKU8ayU5upfu5kFsnnSmTDK4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170113_073419_365846_A9D24D48 X-CRM114-Status: GOOD ( 11.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alessandro Zummo , Amelie Delaunay , Alexandre Torgue , Arnd Bergmann , Mathieu Poirier , linux-kernel@vger.kernel.org, Mark Brown , Maxime Coquelin , rtc-linux@googlegroups.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Using the ~ operator on a BIT() constant results in a large 'unsigned long' constant that won't fit into an 'unsigned int' function argument on 64-bit architectures, resulting in a harmless build warning in x86 allmodconfig: drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_probe': drivers/rtc/rtc-stm32.c:651:51: error: large integer implicitly truncated to unsigned type [-Werror=overflow] regmap_update_bits(rtc->dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP); This works around the warning by adding an explict cast to 'u32', but that is unfortunately a bit ugly and I feel there should be a better way to do this, possibly with some changes to either the bitops.h header or the regmap API. Cc: Mark Brown Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Arnd Bergmann --- drivers/rtc/rtc-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 8c599f52124c..05d3dc89e55f 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -92,7 +92,7 @@ /* STM32_PWR_CR */ #define PWR_CR 0x00 /* STM32_PWR_CR bit field */ -#define PWR_CR_DBP BIT(8) +#define PWR_CR_DBP (u32)BIT(8) struct stm32_rtc { struct rtc_device *rtc_dev;