]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: stm32f7_i2c: fix usage of useless local variable
authorPatrice Chotard <patrice.chotard@st.com>
Tue, 17 Oct 2017 09:21:33 +0000 (11:21 +0200)
committerHeiko Schocher <hs@denx.de>
Tue, 17 Oct 2017 09:28:41 +0000 (11:28 +0200)
Remove useless local variable "s" and use directly
function's parameter "output"

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
drivers/i2c/stm32f7_i2c.c

index 346748d433142d6109bd390f1a32a850311bc353..86624878e2eacc77cfe2cf42bd8793d5d8a44b04 100644 (file)
@@ -640,7 +640,7 @@ static int stm32_i2c_compute_timing(struct stm32_i2c_priv *i2c_priv,
                                      struct stm32_i2c_setup *setup,
                                      struct stm32_i2c_timings *output)
 {
-       struct stm32_i2c_timings *v, *_v, s;
+       struct stm32_i2c_timings *v, *_v;
        struct list_head solutions;
        int ret;
 
@@ -676,16 +676,10 @@ static int stm32_i2c_compute_timing(struct stm32_i2c_priv *i2c_priv,
        if (ret)
                goto exit;
 
-       ret = stm32_i2c_choose_solution(setup, &solutions, &s);
+       ret = stm32_i2c_choose_solution(setup, &solutions, output);
        if (ret)
                goto exit;
 
-       output->presc = s.presc;
-       output->scldel = s.scldel;
-       output->sdadel = s.sdadel;
-       output->scll = s.scll;
-       output->sclh = s.sclh;
-
        debug("%s: Presc: %i, scldel: %i, sdadel: %i, scll: %i, sclh: %i\n",
              __func__, output->presc,
              output->scldel, output->sdadel,