summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-08-24 21:56:12 -0700
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-08-27 14:16:31 +0200
commit1d0e5ebf0caaaadbc93470850d17786f94c776c2 (patch)
tree29e5eac3315212013dc3536c416e5424b2c905b5 /drivers/mtd/devices
parent9b2108429ce7405e14d26c37eccd627fc35c605a (diff)
downloadlinux-1d0e5ebf0caaaadbc93470850d17786f94c776c2.tar.bz2
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
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/lart.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mtd/devices/lart.c b/drivers/mtd/devices/lart.c
index 56f50d27b7fd..aecd441e4183 100644
--- a/drivers/mtd/devices/lart.c
+++ b/drivers/mtd/devices/lart.c
@@ -436,7 +436,10 @@ static int flash_read (struct mtd_info *mtd,loff_t from,size_t len,size_t *retle
{
int gap = BUSWIDTH - (from & (BUSWIDTH - 1));
- while (len && gap--) *buf++ = read8 (from++), len--;
+ while (len && gap--) {
+ *buf++ = read8 (from++);
+ len--;
+ }
}
/* 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
i = n = 0;
while (gap--) tmp[i++] = 0xFF;
- while (len && i < BUSWIDTH) tmp[i++] = buf[n++], len--;
+ while (len && i < BUSWIDTH) {
+ tmp[i++] = buf[n++];
+ len--;
+ }
while (i < BUSWIDTH) tmp[i++] = 0xFF;
if (!write_dword (aligned,*((__u32 *) tmp))) return (-EIO);