Skip to contentSkip to conversation

spl: spl_sata: Add __maybe_unused decorator

PATCH In review Tom Rini 1 participant 2 messages Oct 1, 2025 – Oct 10, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 spl: spl_sata: Add __maybe_unused decorator

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.

---
 common/spl/spl_sata.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
common/spl/spl_sata.c +5 -3
index 67fc620d9bea..09f94e662fc2 100644
@@ -14,10 +14,12 @@
 #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;
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 5 lines · Tom Rini

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.

Applied to u-boot/master, thanks!

[1/1] spl: spl_sata: Add __maybe_unused decorator

      commit: a574f8a3e504bed1baaef00c6ba1ac395e43be43
Signature · 1 line
Tom