layerscape: add patches-5.4
[openwrt/staging/ynezz.git] / target / linux / layerscape / patches-5.4 / 813-pm-0006-soc-fsl-rcpm-remove-build-warning.patch
1 From 341e6a1cbbc8a06702df15c147cbe1264418bf3b Mon Sep 17 00:00:00 2001
2 From: Biwen Li <biwen.li@nxp.com>
3 Date: Thu, 5 Dec 2019 17:21:06 +0800
4 Subject: [PATCH] soc: fsl: rcpm: remove build warning
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This removes build warning,
10 drivers/soc/fsl/rcpm.c: In function ‘rcpm_pm_prepare’:
11 drivers/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 ^~
14 drivers/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
17 Reviewed-by: Ran Wang <ran.wang_1@nxp.com>
18 Signed-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 }