diff mbox series

video: sandbox: fix missing shim definition of sandbox_sdl_remove_display()

Message ID 20220311185228.2471858-1-vladimir.oltean@nxp.com
State Handled Elsewhere
Delegated to: Simon Glass
Headers show
Series video: sandbox: fix missing shim definition of sandbox_sdl_remove_display() | expand

Commit Message

Vladimir Oltean March 11, 2022, 6:52 p.m. UTC
When CONFIG_SANDBOX_SDL=n, sandbox_sdl_set_bpp() from drivers/video/sandbox_sdl.c
calls sandbox_sdl_remove_display() in arch/sandbox/cpu/sdl.c, but this
isn't compiled in. A shim definition is missing, leading to a
compilation warning (missing function prototype) and a linkage bug.

Fixes: 8657ad43f353 ("sandbox: video: Add BMP tests for 32bpp and 8bpp modes")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
I see Simon's email on the list from January 10 saying:

| I see that I broke it...it needs a static inline for
| sandbox_sdl_remove_display().

https://lore.kernel.org/all/CAPnjgZ0yqn_MjZ3uTLCrRp1-ifskKJgTmqmA4x31JZqVYn=Qgg@mail.gmail.com/

but I'm looking at the current 'master' and 'next' branches and that bug
is still there, huh. Am I missing something?

 arch/sandbox/include/asm/sdl.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Simon Glass March 12, 2022, 5:02 a.m. UTC | #1
On Fri, 11 Mar 2022 at 11:52, Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> When CONFIG_SANDBOX_SDL=n, sandbox_sdl_set_bpp() from drivers/video/sandbox_sdl.c
> calls sandbox_sdl_remove_display() in arch/sandbox/cpu/sdl.c, but this
> isn't compiled in. A shim definition is missing, leading to a
> compilation warning (missing function prototype) and a linkage bug.
>
> Fixes: 8657ad43f353 ("sandbox: video: Add BMP tests for 32bpp and 8bpp modes")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> I see Simon's email on the list from January 10 saying:
>
> | I see that I broke it...it needs a static inline for
> | sandbox_sdl_remove_display().
>
> https://lore.kernel.org/all/CAPnjgZ0yqn_MjZ3uTLCrRp1-ifskKJgTmqmA4x31JZqVYn=Qgg@mail.gmail.com/
>
> but I'm looking at the current 'master' and 'next' branches and that bug
> is still there, huh. Am I missing something?
>
>  arch/sandbox/include/asm/sdl.h | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index e271a849af10..56dcb84803d3 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -94,6 +94,11 @@  static inline int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 	return -ENODEV;
 }
 
+static inline int sandbox_sdl_remove_display(void)
+{
+	return -ENODEV;
+}
+
 static inline int sandbox_sdl_sync(void *lcd_base)
 {
 	return -ENODEV;