From: Bhagyashri Dighole Date: Tue, 19 Mar 2019 11:00:37 +0000 (+0530) Subject: staging: fbtft: ternary statement to if statement. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e54c2b0aefa6c7c6048667ae2ea729d5df94fb85;p=linux.git staging: fbtft: ternary statement to if statement. Convert a ternary statement into a if statement which is detected while resolving "WARNING: line over 80 characters". Use BIT() macro instead manually left shifting. Signed-off-by: Bhagyashri Dighole Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fbtft/fb_ssd1306.c b/drivers/staging/fbtft/fb_ssd1306.c index d7c5e2e0eee96..6cf9df579e88b 100644 --- a/drivers/staging/fbtft/fb_ssd1306.c +++ b/drivers/staging/fbtft/fb_ssd1306.c @@ -184,7 +184,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) for (y = 0; y < yres / 8; y++) { *buf = 0x00; for (i = 0; i < 8; i++) - *buf |= (vmem16[(y * 8 + i) * xres + x] ? 1 : 0) << i; + if (vmem16[(y * 8 + i) * xres + x]) + *buf |= BIT(i); buf++; } }