]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: spl_sata: Add __maybe_unused decorator
authorTom Rini <trini@konsulko.com>
Wed, 1 Oct 2025 20:30:55 +0000 (14:30 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 10 Oct 2025 16:27:13 +0000 (10:27 -0600)
It is possible that we will not have enabled the options to call
spl_sata_load_image_raw so use the __maybe_unused decorator to silence
the compiler warning.

Signed-off-by: Tom Rini <trini@konsulko.com>
common/spl/spl_sata.c

index 67fc620d9bea91d330b1dbbb1f9fc5269c387ced..09f94e662fc21be2e2e5ed3ed66f077d475ceaf8 100644 (file)
 #include <errno.h>
 #include <fat.h>
 #include <image.h>
+#include <linux/compiler.h>
 
-static int spl_sata_load_image_raw(struct spl_image_info *spl_image,
-               struct spl_boot_device *bootdev,
-               struct blk_desc *stor_dev, unsigned long sector)
+static int __maybe_unused spl_sata_load_image_raw(struct spl_image_info *spl_image,
+                                                 struct spl_boot_device *bootdev,
+                                                 struct blk_desc *stor_dev,
+                                                 unsigned long sector)
 {
        struct legacy_img_hdr *header;
        unsigned long count;