]> git.baikalelectronics.ru Git - kernel.git/commit
staging: fbtft: simplify array index computation
authorDeepak R Varma <mh12gx2825@gmail.com>
Sun, 15 Mar 2020 23:42:08 +0000 (05:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Mar 2020 11:47:24 +0000 (12:47 +0100)
commit8ccfc56e7fdf95979c34de78445386cea86089e1
treecf18bc56df357012c59951f328648fa0510b1e8d
parent012925aea3a43f9c1a30400c5513808c8eef9a2b
staging: fbtft: simplify array index computation

An array index is being computed by mathematical calculation on the
Lvalue side of the expression. This also further results in the statement
exceeding 80 character statement length.

A local variable can store the value of the array index computation. The
variable can then be used as array index. This improves readability of
the code and also address 80 character warning raised by checkpatch.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/4bf407e1b3e05745f767b2bad6218c9fb836d869.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-sysfs.c