From 7d304186057cc6c66e5469fadd003e3a62b8eb63 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 15 Apr 2020 17:05:38 +0200 Subject: soc/amd/common/psp: refactor psp_print_cmd_status parameters psp_print_cmd_status only needs data from the mbox buffer header and not the whole buffer. This avoids type casts when the buffer type isn't mbox_default_buffer. BUG=b:153677737 Change-Id: I8688b66fefe89fc4f3ce2207d4360ceb2dbaef12 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/40412 Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/psp/psp_smm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/amd/common/block/psp/psp_smm.c') diff --git a/src/soc/amd/common/block/psp/psp_smm.c b/src/soc/amd/common/block/psp/psp_smm.c index 4ae2277cab..7ffa6b6116 100644 --- a/src/soc/amd/common/block/psp/psp_smm.c +++ b/src/soc/amd/common/block/psp/psp_smm.c @@ -72,7 +72,7 @@ int psp_notify_smm(void) clear_smm_flag(); /* buffer's status shouldn't change but report it if it does */ - psp_print_cmd_status(cmd_status, (struct mbox_default_buffer *)&buffer); + psp_print_cmd_status(cmd_status, &buffer.header); return cmd_status; } @@ -102,5 +102,5 @@ void psp_notify_sx_info(u8 sleep_type) clear_smm_flag(); /* buffer's status shouldn't change but report it if it does */ - psp_print_cmd_status(cmd_status, (struct mbox_default_buffer *)buffer); + psp_print_cmd_status(cmd_status, &buffer->header); } -- cgit v1.2.3