Re: [PATCH 15/29] mtd: Avoid comma separated statements

2020-09-07 Thread Miquel Raynal
On Tue, 2020-08-25 at 04:56:12 UTC, Joe Perches wrote:
> Use semicolons and braces.
> 
> Signed-off-by: Joe Perches 

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git 
mtd/next, thanks.

Miquel


[PATCH 15/29] mtd: Avoid comma separated statements

2020-08-24 Thread Joe Perches
Use semicolons and braces.

Signed-off-by: Joe Perches 
---
 drivers/mtd/devices/lart.c | 10 --
 1 file 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);
-- 
2.26.0