diff mbox series

hw/fsp: Remove stray va_end() in __fsp_fillmsg()

Message ID 20200305051238.4621-1-oohall@gmail.com
State Accepted
Headers show
Series hw/fsp: Remove stray va_end() in __fsp_fillmsg() | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (82aed17a5468aff6b600ee1694a10a60f942c018)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Oliver O'Halloran March 5, 2020, 5:12 a.m. UTC
__fsp_fillmsg() is called from fsp_fillmsg() and fsp_mkmsg(). Both
callers wrap it in a va_start() / va_end() pair so using va_end()
inside the function is almost certainly wrong.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
circa 2012 ben code, might be the oldest bug in skiboot.
---
---
 hw/fsp/fsp.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Oliver O'Halloran March 30, 2020, 6:31 a.m. UTC | #1
On Thu, Mar 5, 2020 at 4:12 PM Oliver O'Halloran <oohall@gmail.com> wrote:
>
> __fsp_fillmsg() is called from fsp_fillmsg() and fsp_mkmsg(). Both
> callers wrap it in a va_start() / va_end() pair so using va_end()
> inside the function is almost certainly wrong.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

Merged as 2e122fbadf7f1175202151f72ee4b81bcb811cb3
diff mbox series

Patch

diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 196fa34d5dbf..392cf5d36409 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -995,7 +995,6 @@  static void __fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod,
 
 	for (i = 0; i < add_words; i++)
 		fsp_msg_set_data_word(msg, i, va_arg(list, unsigned int));
-	va_end(list);
 }
 
 void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u32 add_words, ...)