]> git.sur5r.net Git - u-boot/blobdiff - cmd/disk.c
spi: cadence_qspi: Fix warning cast from pointer to integer of different size
[u-boot] / cmd / disk.c
index e0219f810e381d0dcd6584903b787ec7d38a80c1..dcc36a6c2cb72fae38b9fb59fe64280b5263c8a3 100644 (file)
@@ -1,19 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000-2011
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
 #include <command.h>
 #include <part.h>
 
-#if defined(CONFIG_CMD_IDE) || defined(CONFIG_CMD_SCSI) || \
-       defined(CONFIG_USB_STORAGE)
 int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
                    char *const argv[])
 {
-       int dev, part;
+       __maybe_unused int dev;
+       int part;
        ulong addr = CONFIG_SYS_LOAD_ADDR;
        ulong cnt;
        disk_partition_t info;
@@ -22,7 +20,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 #endif
        struct blk_desc *dev_desc;
 
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
        const void *fit_hdr = NULL;
 #endif
 
@@ -82,7 +80,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
                cnt = image_get_image_size(hdr);
                break;
 #endif
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
        case IMAGE_FORMAT_FIT:
                fit_hdr = (const void *) addr;
                puts("Fit image detected...\n");
@@ -108,7 +106,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
        }
        bootstage_mark(BOOTSTAGE_ID_IDE_READ);
 
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
        /* This cannot be done earlier,
         * we need complete FIT image in RAM first */
        if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) {
@@ -129,4 +127,3 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 
        return bootm_maybe_autostart(cmdtp, argv[0]);
 }
-#endif