Skip to contentSkip to conversation

Misc fixes part II

PATCH Applied Alexander Shiyan 2 participants 10 messages Jun 10, 2022

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover Misc fixes part II

Unsorted various fixes for the barebox.

Alexander Shiyan (8):
ARM: optee-early: Fix 'memcpy' implicit declaration
ata: ahci: Fix format string
gui: image_renderer: Fix empty prototype for image_renderer_image()
ARM: vexpress: Add missing "noreturn" attribute to restart function
ARM: versatile: Add missing "noreturn" attribute to restart function
lib: logo: Ignore more generated files
mtd: nand: orion: Disallow driver compile for ARMv4T
commands: Add CONSOLE dependency for EDIT command

 arch/arm/lib32/optee-early.c   |  1 +
 arch/arm/mach-versatile/core.c |  2 +-
 arch/arm/mach-vexpress/reset.c |  2 +-
 commands/Kconfig               |  1 +
 drivers/ata/ahci.c             | 10 +++++-----
 drivers/mtd/nand/Kconfig       |  2 +-
 include/gui/image_renderer.h   |  5 ++++-
 lib/logo/.gitignore            | 15 +++++----------
 8 files changed, 19 insertions(+), 19 deletions(-)
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 1/8 ARM: optee-early: Fix 'memcpy' implicit declaration

arch/arm/lib32/optee-early.c: In function 'start_optee_early':
arch/arm/lib32/optee-early.c:26:2: error: implicit declaration of function 'memcpy' [-Werror=implicit-function-declaration] memcpy((void *)hdr->init_load_addr_lo, tee + sizeof(*hdr), hdr->init_size);

---
 arch/arm/lib32/optee-early.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/lib32/optee-early.c +1 -0
index 197325b8a0..735d829c99 100644
@@ -9,6 +9,7 @@
 #include <asm/setjmp.h>
 #include <tee/optee.h>
 #include <debug_ll.h>
+#include <string.h>
 
 static jmp_buf tee_buf;
 
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/8 ata: ahci: Fix format string

In reply to Alexander Shiyan

drivers/ata/ahci.c: In function 'ahci_print_info':
drivers/ata/ahci.c:517:9: warning: too many arguments for format [-Wformat-extra-args]

Fixes b5da6970bf23 ("ata: ahci: add missing capability in ahci_print_info()")
---
 drivers/ata/ahci.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/ata/ahci.c +5 -5
index eb9e1bd133..f4b93183ce 100644
@@ -304,8 +304,8 @@ static int ahci_init_port(struct ahci_port *ahci_port)
 	ahci_port->cmd_slot = mem;
 	ahci_port->cmd_slot_dma = mem_dma;
 
-	ahci_port_debug(ahci_port, "cmd_slot = 0x%p (0x%pa)\n",
-			ahci_port->cmd_slot, ahci_port->cmd_slot_dma);
+	ahci_port_debug(ahci_port, "cmd_slot = 0x%p (0x%pad)\n",
+			ahci_port->cmd_slot, &ahci_port->cmd_slot_dma);
 
 	/*
 	 * Second item: Received-FIS area
@@ -320,8 +320,8 @@ static int ahci_init_port(struct ahci_port *ahci_port)
 	ahci_port->cmd_tbl = mem + AHCI_CMD_LIST_SZ + AHCI_RX_FIS_SZ;
 	ahci_port->cmd_tbl_dma = mem_dma + AHCI_CMD_LIST_SZ + AHCI_RX_FIS_SZ;
 
-	ahci_port_debug(ahci_port, "cmd_tbl = 0x%p (0x%pa)\n",
-			ahci_port->cmd_tbl, ahci_port->cmd_tbl_dma);
+	ahci_port_debug(ahci_port, "cmd_tbl = 0x%p (0x%pad)\n",
+			ahci_port->cmd_tbl, &ahci_port->cmd_tbl_dma);
 
 	ahci_port->cmd_tbl_sg = ahci_port->cmd_tbl + AHCI_CMD_TBL_HDR_SZ;
 
@@ -517,7 +517,7 @@ void ahci_print_info(struct ahci_device *ahci)
 	printf("flags: "
 	       "%s%s%s%s%s%s%s"
 	       "%s%s%s%s%s%s%s"
-	       "%s%s%s%s%s%s\n",
+	       "%s%s%s%s%s%s%s\n",
 	       cap & HOST_CAP_64 ? "64bit " : "",
 	       cap & HOST_CAP_NCQ ? "ncq " : "",
 	       cap & HOST_CAP_SNTF ? "sntf " : "",
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/8 gui: image_renderer: Fix empty prototype for image_renderer_image()

In reply to Alexander Shiyan

In file included from lib/gui/png.c:9:
include/gui/image_renderer.h: In function 'image_renderer_file':
include/gui/image_renderer.h:67:29: warning: passing argument 1 of 'image_renderer_image' from incompatible pointer type [-Wincompatible-pointer-types] ret = image_renderer_image(sc, s, img);
include/gui/image_renderer.h:56:42: note: expected 'struct surface *' but argument is of type 'struct screen *'
int image_renderer_image(struct surface *s, struct image *img);
include/gui/image_renderer.h:67:33: warning: passing argument 2 of 'image_renderer_image' from incompatible pointer type [-Wincompatible-pointer-types] ret = image_renderer_image(sc, s, img);
include/gui/image_renderer.h:56:59: note: expected 'struct image *' but argumentis of type 'struct surface *'
int image_renderer_image(struct surface *s, struct image *img);
include/gui/image_renderer.h:67:8: error: too many arguments to function 'image_renderer_image'
ret = image_renderer_image(sc, s, img);
include/gui/image_renderer.h:56:5: note: declared here
int image_renderer_image(struct surface *s, struct image *img);

Fixes 3fa8d74abea3 ("gui: introduce screen and surface to factorize and simplify code")
---
 include/gui/image_renderer.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/gui/image_renderer.h +4 -1
index bfdea1b14e..323ad741b3 100644
@@ -53,7 +53,10 @@ static inline struct image *image_renderer_open(const char* file)
 
 static inline void image_renderer_close(struct image *img) {}
 
-int image_renderer_image(struct surface *s, struct image *img);
+static inline int image_renderer_image(struct screen *sc, struct surface *s, struct image *img)
+{
+	return -EINVAL;
+}
 #endif
 
 static inline int image_renderer_file(struct screen *sc, struct surface *s, const char* file)
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH 4/8 ARM: vexpress: Add missing "noreturn" attribute to restart function

In reply to Alexander Shiyan
---
 arch/arm/mach-vexpress/reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-vexpress/reset.c +1 -1
index 78e452936d..01cd01e6df 100644
@@ -14,7 +14,7 @@
 
 void __iomem *v2m_wdt_base;
 
-static void vexpress_reset_soc(struct restart_handler *rst)
+static void __noreturn vexpress_reset_soc(struct restart_handler *rst)
 {
 	writel(LOAD_MIN, v2m_wdt_base + WDTLOAD);
 	writeb(RESET_ENABLE, v2m_wdt_base + WDTCONTROL);
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 5/8 ARM: versatile: Add missing "noreturn" attribute to restart function

In reply to Alexander Shiyan
---
 arch/arm/mach-versatile/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-versatile/core.c +1 -1
index 9a2a9cad80..9a81b5b6f3 100644
@@ -173,7 +173,7 @@ void versatile_register_uart(unsigned id)
 	amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0);
 }
 
-static void versatile_reset_soc(struct restart_handler *rst)
+static void __noreturn versatile_reset_soc(struct restart_handler *rst)
 {
 	u32 val;
 
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH 6/8 lib: logo: Ignore more generated files

In reply to Alexander Shiyan
---
 lib/logo/.gitignore | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
lib/logo/.gitignore +5 -10
index 800a44c414..62ee7d270e 100644
@@ -1,12 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-barebox-logo-w64.bblogo
-barebox-logo-w64.bblogo.S
-barebox-logo-w240.bblogo
-barebox-logo-w240.bblogo.S
-barebox-logo-w320.bblogo
-barebox-logo-w320.bblogo.S
-barebox-logo-w400.bblogo
-barebox-logo-w400.bblogo.S
-barebox-logo-w640.bblogo
-barebox-logo-w640.bblogo.S
+barebox-logo-*.bblogo
+barebox-logo-*.bblogo.S
+barebox-logo-*.bmp
+barebox-logo-*.png
+barebox-logo-*.qoi
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

PATCH 7/8 mtd: nand: orion: Disallow driver compile for ARMv4T

In reply to Alexander Shiyan

This fixes the following error (when ARMv4T and COMPILE_TEST are set):
{standard input}: Assembler messages:
{standard input}:197: Error: selected processor does not support "ldrd r2,[r4]" in ARM mode
CC drivers/virtio/virtio.o
make[3]: *** [/home/ARM/barebox/scripts/Makefile.build:140: drivers/mtd/nand/nand_orion.o] Error 1

---
 drivers/mtd/nand/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/Kconfig +1 -1
index 3bdfabb439..2cd52f3820 100644
@@ -82,7 +82,7 @@ config MTD_NAND_OMAP_ELM
 config NAND_ORION
 	bool
 	prompt "Marvell Orion NAND driver"
-	depends on ARM && (ARCH_KIRKWOOD || COMPILE_TEST)
+	depends on (ARM && !CPU_32v4T) && (ARCH_KIRKWOOD || COMPILE_TEST)
 	help
 	  Support for the Orion NAND controller, present in Kirkwood SoCs.
 
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH 8/8 commands: Add CONSOLE dependency for EDIT command

In reply to Alexander Shiyan

This fixes the following error (without CONSOLE support):
arm-linux-ld: commands/edit.o: in function "do_edit":
/home/ARM/barebox/commands/edit.c:684: undefined reference to "console_list"
make: *** [Makefile:872: .tmp_barebox1] Error 1

---
 commands/Kconfig | 1 +
 1 file changed, 1 insertion(+)
commands/Kconfig +1 -0
index c5505321cf..86e4714849 100644
@@ -1327,6 +1327,7 @@ config CMD_ECHO_E
 
 config CMD_EDIT
 	tristate
+	depends on CONSOLE_FULL || CONSOLE_SIMPLE
 	prompt "edit"
 	help
 	  A  small fill-screen editor.
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#9 lore raw
In reply to Alexander Shiyan
Quoted 11 lines · Alexander Shiyan

Unsorted various fixes for the barebox.

Alexander Shiyan (8):
ARM: optee-early: Fix 'memcpy' implicit declaration
ata: ahci: Fix format string
gui: image_renderer: Fix empty prototype for image_renderer_image()
ARM: vexpress: Add missing "noreturn" attribute to restart function
ARM: versatile: Add missing "noreturn" attribute to restart function
lib: logo: Ignore more generated files
mtd: nand: orion: Disallow driver compile for ARMv4T
commands: Add CONSOLE dependency for EDIT command

Applied, thanks

Sascha

Quoted 20 lines
 arch/arm/lib32/optee-early.c   |  1 +
 arch/arm/mach-versatile/core.c |  2 +-
 arch/arm/mach-vexpress/reset.c |  2 +-
 commands/Kconfig               |  1 +
 drivers/ata/ahci.c             | 10 +++++-----
 drivers/mtd/nand/Kconfig       |  2 +-
 include/gui/image_renderer.h   |  5 ++++-
 lib/logo/.gitignore            | 15 +++++----------
 8 files changed, 19 insertions(+), 19 deletions(-)
Signature · 7 lines
2.32.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox