diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-04-22 10:53:21 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-06-29 16:47:22 +0200 |
commit | e3820ef271880e6335744372bcc6b49952065ece (patch) | |
tree | e9688677fdfeaabb63b1f6a43573cd7ce4e322f1 /arch | |
parent | b50ac721f97ccdd0a182cb0522a999a5663c59dc (diff) |
tegra: fix dvfs gcc 5.2 build error
This fixes the following GCC 5.2 built time error:
arch/arm/mach-tegra/tegra_cl_dvfs.c: In function 'monitor_get':
arch/arm/mach-tegra/tegra_cl_dvfs.c:372:8: error: 'v' may be used uninitialized in this function [-Werror=maybe-uninitialized]
*data &= CL_DVFS_MONITOR_DATA_MASK;
^
arch/arm/mach-tegra/tegra_cl_dvfs.c:2949:6: note: 'v' was declared here
u32 v, s;
^
arch/arm/mach-tegra/tegra_cl_dvfs.c: In function 'cl_dvfs_calibrate':
arch/arm/mach-tegra/tegra_cl_dvfs.c:372:8: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
*data &= CL_DVFS_MONITOR_DATA_MASK;
^
arch/arm/mach-tegra/tegra_cl_dvfs.c:902:11: note: 'data' was declared here
u32 val, data;
^
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/tegra_cl_dvfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/tegra_cl_dvfs.c b/arch/arm/mach-tegra/tegra_cl_dvfs.c index 6dd7712b7961..1eb08abdfdcc 100644 --- a/arch/arm/mach-tegra/tegra_cl_dvfs.c +++ b/arch/arm/mach-tegra/tegra_cl_dvfs.c @@ -899,7 +899,7 @@ static inline void calibration_timer_update(struct tegra_cl_dvfs *cld) static void cl_dvfs_calibrate(struct tegra_cl_dvfs *cld) { - u32 val, data; + u32 val, data = 0; ktime_t now; unsigned long rate; unsigned long step = RATE_STEP(cld); @@ -2946,7 +2946,7 @@ DEFINE_SIMPLE_ATTRIBUTE(lock_fops, lock_get, lock_set, "%llu\n"); static int monitor_get(void *data, u64 *val) { - u32 v, s; + u32 v = 0, s; unsigned long flags; struct clk *c = (struct clk *)data; struct tegra_cl_dvfs *cld = ((struct clk *)data)->u.dfll.cl_dvfs; |