blob: e59e4f510907427d85010815b29a1cbcdeedf565 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 341e6a1cbbc8a06702df15c147cbe1264418bf3b Mon Sep 17 00:00:00 2001
2From: Biwen Li <biwen.li@nxp.com>
3Date: Thu, 5 Dec 2019 17:21:06 +0800
4Subject: [PATCH] soc: fsl: rcpm: remove build warning
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This removes build warning,
10drivers/soc/fsl/rcpm.c: In function rcpm_pm_prepare’:
11drivers/soc/fsl/rcpm.c:126:37: warning: left shift count >= width of type [-Wshift-count-overflow]
12 (u32)(((u64)(reg_offset[1] << (sizeof(u32) * 8) |
13 ^~
14drivers/soc/fsl/rcpm.c:131:38: warning: left shift count >= width of type [-Wshift-count-overflow]
15 (u32)(((u64)(reg_offset[1] << (sizeof(u32) * 8) |
16
17Reviewed-by: Ran Wang <ran.wang_1@nxp.com>
18Signed-off-by: Biwen Li <biwen.li@nxp.com>
19---
20 drivers/soc/fsl/rcpm.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23--- a/drivers/soc/fsl/rcpm.c
24+++ b/drivers/soc/fsl/rcpm.c
25@@ -123,12 +123,12 @@ static int rcpm_pm_prepare(struct device
26 }
27 /* Read value from register SCFG_SPARECR8 */
28 regmap_read(scfg_addr_regmap,
29- (u32)(((u64)(reg_offset[1] << (sizeof(u32) * 8) |
30+ ((((u64)reg_offset[1] << (sizeof(u32) * 8) |
31 reg_offset[2])) & 0xffffffff),
32 &reg_value);
33 /* Write value to register SCFG_SPARECR8 */
34 regmap_write(scfg_addr_regmap,
35- (u32)(((u64)(reg_offset[1] << (sizeof(u32) * 8) |
36+ ((((u64)reg_offset[1] << (sizeof(u32) * 8) |
37 reg_offset[2])) & 0xffffffff),
38 tmp | reg_value);
39 }