[U-Boot] [PATCH v2 16/29] dm: scsi: Indent the confusing #ifdefs

Simon Glass sjg at chromium.org
Thu Jun 15 03:28:35 UTC 2017


These are very confusing without some sort of indentation. At some point
we will be able to remove them, but for now, indent them.

Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---

Changes in v2: None

 drivers/scsi/scsi.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 2d0f81ad1f..e3d169045b 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -14,19 +14,19 @@
 #include <dm/uclass-internal.h>
 
 #if !defined(CONFIG_DM_SCSI)
-#ifdef CONFIG_SCSI_DEV_LIST
-#define SCSI_DEV_LIST CONFIG_SCSI_DEV_LIST
-#else
-#ifdef CONFIG_SATA_ULI5288
-
-#define SCSI_VEND_ID 0x10b9
-#define SCSI_DEV_ID  0x5288
-
-#elif !defined(CONFIG_SCSI_AHCI_PLAT)
-#error no scsi device defined
-#endif
-#define SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
-#endif
+# ifdef CONFIG_SCSI_DEV_LIST
+#  define SCSI_DEV_LIST CONFIG_SCSI_DEV_LIST
+# else
+#  ifdef CONFIG_SATA_ULI5288
+
+#   define SCSI_VEND_ID 0x10b9
+#   define SCSI_DEV_ID  0x5288
+
+#  elif !defined(CONFIG_SCSI_AHCI_PLAT)
+#   error no scsi device defined
+#  endif
+# define SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
+# endif
 #endif
 
 #if defined(CONFIG_PCI) && !defined(CONFIG_SCSI_AHCI_PLAT)
-- 
2.13.1.518.g3df882009-goog



More information about the U-Boot mailing list