mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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 <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7945e27826
commit
e54c2b0aef
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user