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

mtd: Avoid comma separated statements

Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/ae92f4c0507c470d9461886410dc7030192f9014.1598331149.git.joe@perches.com

authored by

Joe Perches and committed by
Miquel Raynal
1d0e5ebf 9b210842

+8 -2
+8 -2
drivers/mtd/devices/lart.c
··· 436 436 { 437 437 int gap = BUSWIDTH - (from & (BUSWIDTH - 1)); 438 438 439 - while (len && gap--) *buf++ = read8 (from++), len--; 439 + while (len && gap--) { 440 + *buf++ = read8 (from++); 441 + len--; 442 + } 440 443 } 441 444 442 445 /* now we read dwords until we reach a non-dword boundary */ ··· 521 518 i = n = 0; 522 519 523 520 while (gap--) tmp[i++] = 0xFF; 524 - while (len && i < BUSWIDTH) tmp[i++] = buf[n++], len--; 521 + while (len && i < BUSWIDTH) { 522 + tmp[i++] = buf[n++]; 523 + len--; 524 + } 525 525 while (i < BUSWIDTH) tmp[i++] = 0xFF; 526 526 527 527 if (!write_dword (aligned,*((__u32 *) tmp))) return (-EIO);