Skip to content

Commit 1d0e5eb

Browse files
JoePerchesmiquelraynal
authored andcommitted
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
1 parent 9b21084 commit 1d0e5eb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

drivers/mtd/devices/lart.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ static int flash_read (struct mtd_info *mtd,loff_t from,size_t len,size_t *retle
436436
{
437437
int gap = BUSWIDTH - (from & (BUSWIDTH - 1));
438438

439-
while (len && gap--) *buf++ = read8 (from++), len--;
439+
while (len && gap--) {
440+
*buf++ = read8 (from++);
441+
len--;
442+
}
440443
}
441444

442445
/* now we read dwords until we reach a non-dword boundary */
@@ -518,7 +521,10 @@ static int flash_write (struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen
518521
i = n = 0;
519522

520523
while (gap--) tmp[i++] = 0xFF;
521-
while (len && i < BUSWIDTH) tmp[i++] = buf[n++], len--;
524+
while (len && i < BUSWIDTH) {
525+
tmp[i++] = buf[n++];
526+
len--;
527+
}
522528
while (i < BUSWIDTH) tmp[i++] = 0xFF;
523529

524530
if (!write_dword (aligned,*((__u32 *) tmp))) return (-EIO);

0 commit comments

Comments
 (0)