lkml.org 
[lkml]   [2018]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2 13/15] staging: fbtft: Corrects long index line - Style
Avoids a very long line of index, improving readability.

Signed-off-by: Leonardo Brás <leobras.c@gmail.com>
---
drivers/staging/fbtft/fbtft-sysfs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c
index 2a5c630dab87..9caeb9ceb008 100644
--- a/drivers/staging/fbtft/fbtft-sysfs.c
+++ b/drivers/staging/fbtft/fbtft-sysfs.c
@@ -25,6 +25,7 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
unsigned long val = 0;
int ret = 0;
int curve_counter, value_counter;
+ unsigned long idx;

fbtft_par_dbg(DEBUG_SYSFS, par, "%s() str=\n", __func__);

@@ -68,7 +69,10 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
ret = get_next_ulong(&curve_p, &val, " ", 16);
if (ret)
goto out;
- curves[curve_counter * par->gamma.num_values + value_counter] = val;
+ idx = curve_counter * par->gamma.num_values +
+ value_counter;
+ curves[idx] = val;
value_counter++;
}
if (value_counter != par->gamma.num_values) {
--
2.18.0
\
 
 \ /
  Last update: 2018-08-08 02:30    [W:0.115 / U:3.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site