diff --git a/drivers/mtd/spi/atmel.c b/drivers/mtd/spi/atmel.c
index 6a92c4b774b41ff85dbb834ccc206e12b8a7017d..f34df43f58bfa76daee274cd931ff5b649415686 100644
--- a/drivers/mtd/spi/atmel.c
+++ b/drivers/mtd/spi/atmel.c
@@ -252,7 +252,7 @@ static int dataflash_write_p2(struct spi_flash *flash,
 	}
 
 	debug("SF: AT45: Successfully programmed %zu bytes @ 0x%x\n",
-			len, offset);
+	      len, offset);
 	ret = 0;
 
 out:
@@ -325,7 +325,7 @@ static int dataflash_write_at45(struct spi_flash *flash,
 	}
 
 	debug("SF: AT45: Successfully programmed %zu bytes @ 0x%x\n",
-			len, offset);
+	      len, offset);
 	ret = 0;
 
 out:
@@ -387,7 +387,7 @@ static int dataflash_erase_p2(struct spi_flash *flash, u32 offset, size_t len)
 	}
 
 	debug("SF: AT45: Successfully erased %zu bytes @ 0x%x\n",
-			len, offset);
+	      len, offset);
 	ret = 0;
 
 out:
@@ -450,7 +450,7 @@ static int dataflash_erase_at45(struct spi_flash *flash, u32 offset, size_t len)
 	}
 
 	debug("SF: AT45: Successfully erased %zu bytes @ 0x%x\n",
-			len, offset);
+	      len, offset);
 	ret = 0;
 
 out:
@@ -476,7 +476,7 @@ struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode)
 
 	if (i == ARRAY_SIZE(atmel_spi_flash_table)) {
 		debug("SF: Unsupported DataFlash ID %02x\n",
-				idcode[1]);
+		      idcode[1]);
 		return NULL;
 	}
 
diff --git a/drivers/mtd/spi/gigadevice.c b/drivers/mtd/spi/gigadevice.c
index 950c7770a961250f9f97fef66f3b49bee4e9dfff..b42581a70f80a48e9590608835dcce33dbf92518 100644
--- a/drivers/mtd/spi/gigadevice.c
+++ b/drivers/mtd/spi/gigadevice.c
@@ -45,7 +45,7 @@ struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi, u8 *idcode)
 
 	if (i == ARRAY_SIZE(gigadevice_spi_flash_table)) {
 		debug("SF: Unsupported Gigadevice ID %02x%02x\n",
-				idcode[1], idcode[2]);
+		      idcode[1], idcode[2]);
 		return NULL;
 	}
 
diff --git a/drivers/mtd/spi/ramtron.c b/drivers/mtd/spi/ramtron.c
index 27e64115b38482fad5c3363ee6b342b3e71e5e96..38f9d69169b2ea4baa60b9f9839557e16855aad6 100644
--- a/drivers/mtd/spi/ramtron.c
+++ b/drivers/mtd/spi/ramtron.c
@@ -266,7 +266,7 @@ struct spi_flash *spi_fram_probe_ramtron(struct spi_slave *spi, u8 *idcode)
 
 	/* arriving here means no method has found a device we can handle */
 	debug("SF/ramtron: unsupported device id0=%02x id1=%02x id2=%02x\n",
-		idcode[0], idcode[1], idcode[2]);
+	      idcode[0], idcode[1], idcode[2]);
 	return NULL;
 
 found:
diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c
index b9a36c2f06cbe8f9c9a3eac6b87d3034ce646c3d..fa7ac8c9322fd20ef39ef786b0fffd1ae9192b1b 100644
--- a/drivers/mtd/spi/spansion.c
+++ b/drivers/mtd/spi/spansion.c
@@ -6,7 +6,7 @@
  * TsiChung Liew (Tsi-Chung.Liew@freescale.com),
  * and  Jason McMullan (mcmullan@netapp.com)
  *
- * SPDX-License-Identifier:	GPL-2.0+ 
+ * SPDX-License-Identifier:	GPL-2.0+
  */
 
 #include <common.h>
diff --git a/drivers/mtd/spi/spi_spl_load.c b/drivers/mtd/spi/spi_spl_load.c
index 7c799ca482ca6617ad29fe05ddd52b927f0a5e68..29355307f3689c0b61f2c6432a0033c4504a8c0f 100644
--- a/drivers/mtd/spi/spi_spl_load.c
+++ b/drivers/mtd/spi/spi_spl_load.c
@@ -39,7 +39,7 @@ void spl_spi_load_image(void)
 
 	/* Load u-boot, mkimage header is 64 bytes. */
 	spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
-			(void *) header);
+		       (void *)header);
 	spl_parse_image_header(header);
 	spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
 		       spl_image.size, (void *)spl_image.load_addr);
diff --git a/drivers/mtd/spi/sst.c b/drivers/mtd/spi/sst.c
index 6292289db68dd255568dabb3551434d5b48a78bc..c9dec3c52fbbd230d43860a41a7fd5fa7b8f150b 100644
--- a/drivers/mtd/spi/sst.c
+++ b/drivers/mtd/spi/sst.c
@@ -113,7 +113,7 @@ sst_byte_write(struct spi_flash *flash, u32 offset, const void *buf)
 	};
 
 	debug("BP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
-		spi_w8r8(flash->spi, CMD_READ_STATUS), buf, cmd[0], offset);
+	      spi_w8r8(flash->spi, CMD_READ_STATUS), buf, cmd[0], offset);
 
 	ret = spi_flash_cmd_write_enable(flash);
 	if (ret)
@@ -160,8 +160,8 @@ sst_write_wp(struct spi_flash *flash, u32 offset, size_t len, const void *buf)
 
 	for (; actual < len - 1; actual += 2) {
 		debug("WP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
-		     spi_w8r8(flash->spi, CMD_READ_STATUS), buf + actual,
-		     cmd[0], offset);
+		      spi_w8r8(flash->spi, CMD_READ_STATUS), buf + actual,
+		      cmd[0], offset);
 
 		ret = spi_flash_cmd_write(flash->spi, cmd, cmd_len,
 					buf + actual, 2);
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index e8cc82751e45f400a7c26d717445166049b46730..c5fa64e376cb235a075039eb4bb6f002c1b99d62 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -8,7 +8,7 @@
  * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  *
- * SPDX-License-Identifier:	GPL-2.0+ 
+ * SPDX-License-Identifier:	GPL-2.0+
  */
 
 #include <common.h>
@@ -166,8 +166,9 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 *idcode)
 			idcode[0] = 0x20;
 			idcode[1] = 0x20;
 			idcode[2] = idcode[3] + 1;
-		} else
+		} else {
 			return NULL;
+		}
 	}
 
 	id = ((idcode[1] << 8) | idcode[2]);
diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c
index c399bf14d1f6ec52c719ec26e55c83ea2d0ea3d4..b31911a4055b14cc984f7b314a96c94c9219894a 100644
--- a/drivers/mtd/spi/winbond.c
+++ b/drivers/mtd/spi/winbond.c
@@ -123,7 +123,7 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode)
 
 	if (i == ARRAY_SIZE(winbond_spi_flash_table)) {
 		debug("SF: Unsupported Winbond ID %02x%02x\n",
-				idcode[1], idcode[2]);
+		      idcode[1], idcode[2]);
 		return NULL;
 	}