[PATCH 01/18] spl: mmc: properly annotate fallthrough
    Andre Przywara 
    andre.przywara at arm.com
       
    Thu Mar 27 16:32:56 CET 2025
    
    
  
Depending on the various MMC boot configurations, we might end up with
trying filesystem mode when a raw image boot failed. This fall-through
in the switch/case statement is explained in a comment, but this is not
visible to the compiler, which still will complain.
Add the proper compiler-visible annotation, to allow enabling the
compiler check in the future.
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
 common/spl/spl_mmc.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index fe4230170a0..d06f9f0dee6 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -411,6 +411,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,
 			return 0;
 #endif
 		/* If RAW mode fails, try FS mode. */
+		fallthrough;
 #ifdef CONFIG_SYS_MMCSD_FS_BOOT
 	case MMCSD_MODE_FS:
 		debug("spl: mmc boot mode: fs\n");
-- 
2.25.1
    
    
More information about the U-Boot
mailing list