Skip to contentSkip to conversation

cmd/cat.c: Add missing include

PATCH In review Tom Rini 1 participant 5 messages May 1, 2025 – May 13, 2025

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/4 cmd/cat.c: Add missing include

This file references errno values and so needs to include <linux/errno.h>.

---
 cmd/cat.c | 1 +
 1 file changed, 1 insertion(+)
cmd/cat.c +1 -0
index 6828b7b364e5..3167cda60327 100644
@@ -8,6 +8,7 @@
 #include <fs.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <linux/errno.h>
 
 static int do_cat(struct cmd_tbl *cmdtp, int flag, int argc,
 		  char *const argv[])
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/4 ext4fs.c: Add missing include

This file references rtc functions and implicitly includes <rtc.h> today. Add this explicitly.

---
 fs/ext4/ext4fs.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/ext4fs.c +1 -0
index 1727da2dc6db..bd058a096142 100644
@@ -27,6 +27,7 @@
 #include <ext4fs.h>
 #include <malloc.h>
 #include <part.h>
+#include <rtc.h>
 #include <u-boot/uuid.h>
 #include "ext4_common.h"
 
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 3/4 fat.c: Add missing include

In reply to Tom Rini

This file references rtc functions and implicitly includes <rtc.h> today. Add this explicitly.

---
 fs/fat/fat.c | 1 +
 1 file changed, 1 insertion(+)
fs/fat/fat.c +1 -0
index e2570e816768..89f2acbba1ef 100644
@@ -21,6 +21,7 @@
 #include <part.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <rtc.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
 #include <linux/ctype.h>
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 4/4 fs.h: Switch to using rtc_def.h

In reply to Tom Rini

This file only needs the definition of 'struct rtc_time' and that is found in <rtc_def.h>. Use that instead of pulling in rtc.h to pull in rtc_def.h as rtc.h includes many other include files.

---
 include/fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/fs.h +1 -1
index 731aaa026375..bec021177371 100644
@@ -5,7 +5,7 @@
 #ifndef _FS_H
 #define _FS_H
 
-#include <rtc.h>
+#include <rtc_def.h>
 
 struct cmd_tbl;
 
Signature · 1 line
2.43.0
author
#4 lore raw
In reply to Tom Rini
Quoted 4 lines · Tom Rini

This file references errno values and so needs to include <linux/errno.h>.

Applied to u-boot/next, thanks!

[1/4] cmd/cat.c: Add missing include

      commit: cfa00751b0516a3c8f4f432962a754fae4d551de
[2/4] ext4fs.c: Add missing include
      commit: 720e0c0f1a14f034df3cc960e0924b74b3ba4fe2
[3/4] fat.c: Add missing include
      commit: a367817c9a7f50b41a9f84e5a0818599e857739d
[4/4] fs.h: Switch to using rtc_def.h
      commit: 4c26de2eea6bcf5f27b13da0372d27d767cd38e3
Signature · 1 line
Tom