Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: fbtft: Fix to avoid precedence issues

Parentheses added to avoid operator precedence issues.

Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rishiraj Manwatkar and committed by
Greg Kroah-Hartman
675b62d2 ca9280d1

+1 -1
+1 -1
drivers/staging/fbtft/fb_hx8340bn.c
··· 157 157 * OP0 OP1 CP0 CP1 CP2 CP3 CP4 MP0 MP1 MP2 MP3 MP4 MP5 CGM0 CGM1 158 158 * ON0 ON1 CN0 CN1 CN2 CN3 CN4 MN0 MN1 MN2 MN3 MN4 MN5 XXXX GC 159 159 */ 160 - #define CURVE(num, idx) curves[num * par->gamma.num_values + idx] 160 + #define CURVE(num, idx) curves[(num) * par->gamma.num_values + (idx)] 161 161 static int set_gamma(struct fbtft_par *par, u32 *curves) 162 162 { 163 163 unsigned long mask[] = {