Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72cf8c56 authored by David Wu's avatar David Wu Committed by Wolfram Sang
Browse files

i2c: rk3x: Fix variable 'min_total_ns' unused warning



This patch fixs the following warning:
drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_v1_calc_timings':
drivers/i2c/busses/i2c-rk3x.c:745:41: warning: variable 'min_total_ns' set but not used [-Wunused-but-set-variable]

Reported-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarDavid Wu <david.wu@rock-chips.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent a8a7d09e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -742,7 +742,7 @@ static int rk3x_i2c_v1_calc_timings(unsigned long clk_rate,
				    struct i2c_timings *t,
				    struct rk3x_i2c_calced_timings *t_calc)
{
	unsigned long min_low_ns, min_high_ns, min_total_ns;
	unsigned long min_low_ns, min_high_ns;
	unsigned long min_setup_start_ns, min_setup_data_ns;
	unsigned long min_setup_stop_ns, max_hold_data_ns;

@@ -793,7 +793,6 @@ static int rk3x_i2c_v1_calc_timings(unsigned long clk_rate,

	/* These are the min dividers needed for min hold times. */
	min_div_for_hold = (min_low_div + min_high_div);
	min_total_ns = min_low_ns + min_high_ns;

	/*
	 * This is the maximum divider so we don't go over the maximum.