Skip to contentSkip to conversation

smbios: address build warning

PATCH In review Peng Fan (OSS) 5 participants 6 messages Dec 3, 2024 – Dec 17, 2024 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smbios: address build warning

From: Peng Fan <[email protected]>

include display_options.h to address build warning:
lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’ [-Wimplicit-function-declaration]

         print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
         ^~~~~~~~~~~~
---
 lib/smbios.c | 1 +
 1 file changed, 1 insertion(+)
lib/smbios.c +1 -0
index a36d4b4e54a..defb6b42f45 100644
@@ -7,6 +7,7 @@
 
 #define LOG_CATEGORY	LOGC_BOARD
 
+#include <display_options.h>
 #include <dm.h>
 #include <env.h>
 #include <linux/stringify.h>
Signature · 1 line
2.35.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

include display_options.h to address build warning:

build warning occurring with CONFIG_LOG=y

Quoted 7 lines

lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’ [-Wimplicit-function-declaration]

          print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
          ^~~~~~~~~~~~
Quoted 16 lines
---
  lib/smbios.c | 1 +
  1 file changed, 1 insertion(+)
lib/smbios.c +1 -0
index a36d4b4e54a..defb6b42f45 100644
@@ -7,6 +7,7 @@
 
  #define LOG_CATEGORY	LOGC_BOARD
 
+#include <display_options.h>
  #include <dm.h>
  #include <env.h>
  #include <linux/stringify.h>
#2 lore raw
Quoted 11 lines

Subject: Re: [PATCH] smbios: address build warning

Quoted 3 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

include display_options.h to address build warning:

build warning occurring with CONFIG_LOG=y

Quoted 2 lines

lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function

Quoted 9 lines

‘print_buffer’

Quoted 5 lines

[-Wimplicit-function-declaration]

          print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
          ^~~~~~~~~~~~

Thanks, please let me know whether I need to post V2 to update commit log to include
"build warning occurring with CONFIG_LOG=y", or Maintainers could help update when apply the patch.

Thanks,
Peng.

Quoted 16 lines
Quoted 16 lines
---
  lib/smbios.c | 1 +
  1 file changed, 1 insertion(+)
lib/smbios.c index renamed from lib/smbios.c +0 -0

a36d4b4e54a..defb6b42f45 100644

lib/smbios.c +1 -0
@@ -7,6 +7,7 @@
 
  #define LOG_CATEGORY	LOGC_BOARD
 
+#include <display_options.h>
  #include <dm.h>
  #include <env.h>
  #include <linux/stringify.h>
#3 lore raw
Quoted 21 lines · Peng Fan
Quoted 11 lines

Subject: Re: [PATCH] smbios: address build warning

Quoted 3 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

include display_options.h to address build warning:

build warning occurring with CONFIG_LOG=y

Quoted 2 lines

lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function

Quoted 9 lines

‘print_buffer’

Quoted 5 lines

[-Wimplicit-function-declaration]

           print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
           ^~~~~~~~~~~~
Quoted 7 lines

Thanks, please let me know whether I need to post V2 to update commit log to include
"build warning occurring with CONFIG_LOG=y", or Maintainers could help update when apply the patch.

Thanks,
Peng.

To me the patch is ok as is.
I was just wondering, why we did not see the issue in CI.

Best regards

Heinrich

Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
---
   lib/smbios.c | 1 +
   1 file changed, 1 insertion(+)
lib/smbios.c index renamed from lib/smbios.c +0 -0

a36d4b4e54a..defb6b42f45 100644

lib/smbios.c +1 -0
@@ -7,6 +7,7 @@
 
   #define LOG_CATEGORY	LOGC_BOARD
 
+#include <display_options.h>
   #include <dm.h>
   #include <env.h>
   #include <linux/stringify.h>
Reviewed-by on v1 1/1
#4 lore raw
In reply to Peng Fan (OSS)
Quoted 28 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

include display_options.h to address build warning:
lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’ [-Wimplicit-function-declaration]

         print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
         ^~~~~~~~~~~~
---
 lib/smbios.c | 1 +
 1 file changed, 1 insertion(+)
lib/smbios.c +1 -1
index a36d4b4e54a..defb6b42f45 100644
@@ -7,6 +7,7 @@
 
 #define LOG_CATEGORY   LOGC_BOARD
 
+#include <display_options.h>
 #include <dm.h>
 #include <env.h>
 #include <linux/stringify.h>
--
Quoted 2 lines

2.35.3

#5 lore raw
In reply to Peng Fan (OSS)
Quoted 8 lines · Peng Fan (OSS)

include display_options.h to address build warning:
lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’ [-Wimplicit-function-declaration]

         print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
         ^~~~~~~~~~~~

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom