projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b21084
)
mtd: Avoid comma separated statements
author
Joe Perches
<joe@perches.com>
Tue, 25 Aug 2020 04:56:12 +0000
(21:56 -0700)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Thu, 27 Aug 2020 12:16:31 +0000
(14:16 +0200)
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
drivers/mtd/devices/lart.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/devices/lart.c
b/drivers/mtd/devices/lart.c
index
56f50d2
..
aecd441
100644
(file)
--- 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);