[coreboot-gerrit] Change in coreboot[master]: amd/common/psp: Convert structure init to C99

Marshall Dawson (Code Review) gerrit at coreboot.org
Wed Dec 13 20:21:09 CET 2017


Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22847


Change subject: amd/common/psp: Convert structure init to C99
......................................................................

amd/common/psp: Convert structure init to C99

Use C99 designated initializers for the psp_notify_dram() buffer
structure.

Change-Id: I2e18b3a2c19b8fb17d0f654b16def52517538957
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/common/block/psp/psp.c
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/22847/1

diff --git a/src/soc/amd/common/block/psp/psp.c b/src/soc/amd/common/block/psp/psp.c
index c1174bc..cfe95f0 100644
--- a/src/soc/amd/common/block/psp/psp.c
+++ b/src/soc/amd/common/block/psp/psp.c
@@ -177,13 +177,14 @@
  */
 int psp_notify_dram(void)
 {
-	struct mbox_default_buffer buffer;
 	int cmd_status;
+	struct mbox_default_buffer buffer = {
+		.header = {
+			.size = sizeof(buffer)
+		}
+	};
 
 	printk(BIOS_DEBUG, "PSP: Notify that DRAM is available... ");
-
-	buffer.header.size = sizeof(struct mbox_default_buffer);
-	buffer.header.status = 0; /* PSP does not report status for this cmd */
 
 	cmd_status = send_psp_command(MBOX_BIOS_CMD_DRAM_INFO, &buffer);
 

-- 
To view, visit https://review.coreboot.org/22847
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e18b3a2c19b8fb17d0f654b16def52517538957
Gerrit-Change-Number: 22847
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171213/39f72bc4/attachment.html>


More information about the coreboot-gerrit mailing list