Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1488802
| From | David Wu <david.wu@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] i2c: rk3x: Fix variable 'min_total_ns' unused warning |
| Date | 2016-09-22 13:40 +0200 |
| Message-ID | <skawa-5IH-17@gated-at.bofh.it> (permalink) |
| References | <skawa-5IH-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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]
Signed-off-by: David Wu <david.wu@rock-chips.com>
---
drivers/i2c/busses/i2c-rk3x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index 965477e..50702c7 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -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.
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] Fix warnings for i2c-rk3x.c David Wu <david.wu@rock-chips.com> - 2016-09-22 13:40 +0200 [PATCH 1/2] i2c: rk3x: Fix sparse warning David Wu <david.wu@rock-chips.com> - 2016-09-22 13:40 +0200 [PATCH 2/2] i2c: rk3x: Fix variable 'min_total_ns' unused warning David Wu <david.wu@rock-chips.com> - 2016-09-22 13:40 +0200 Re: [PATCH 0/2] Fix warnings for i2c-rk3x.c Wolfram Sang <wsa@the-dreams.de> - 2016-09-22 20:00 +0200
csiph-web