From 0623b010362b567d66ae696176478c48a1c67fdd Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Tue, 2 Jun 2020 13:52:26 +0200 Subject: sb/intel/bd82x6x: Align mei_recv_msg() functions They only differ in rather small details, so we can iron them out. Tested on Asus P8Z77-V LX2, still boots. Change-Id: I01907f1b8576e82c74b7beeea31ae8ee3e2cc773 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/42010 Reviewed-by: Nico Huber Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/southbridge/intel/bd82x6x/me.c | 8 ++++---- src/southbridge/intel/bd82x6x/me_8.x.c | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/southbridge/intel/bd82x6x') diff --git a/src/southbridge/intel/bd82x6x/me.c b/src/southbridge/intel/bd82x6x/me.c index 40b0cc2bd8..03b954f9fa 100644 --- a/src/southbridge/intel/bd82x6x/me.c +++ b/src/southbridge/intel/bd82x6x/me.c @@ -234,8 +234,7 @@ static int mei_send_msg(struct mei_header *mei, struct mkhi_header *mkhi, return mei_wait_for_me_ready(); } -static int mei_recv_msg(struct mei_header *mei, struct mkhi_header *mkhi, - void *rsp_data, int rsp_bytes) +static int mei_recv_msg(struct mkhi_header *mkhi, void *rsp_data, int rsp_bytes) { struct mei_header mei_rsp; struct mkhi_header mkhi_rsp; @@ -279,7 +278,8 @@ static int mei_recv_msg(struct mei_header *mei, struct mkhi_header *mkhi, if (mei_rsp.length & 3) ndata++; if (ndata != (expected - 1)) { - printk(BIOS_ERR, "ME: response is missing data\n"); + printk(BIOS_ERR, "ME: response is missing data %d != %d\n", + ndata, (expected - 1)); return -1; } @@ -322,7 +322,7 @@ static inline int mei_sendrecv(struct mei_header *mei, struct mkhi_header *mkhi, { if (mei_send_msg(mei, mkhi, req_data) < 0) return -1; - if (mei_recv_msg(mei, mkhi, rsp_data, rsp_bytes) < 0) + if (mei_recv_msg(mkhi, rsp_data, rsp_bytes) < 0) return -1; return 0; } diff --git a/src/southbridge/intel/bd82x6x/me_8.x.c b/src/southbridge/intel/bd82x6x/me_8.x.c index 1f267f90f5..ff94a88e78 100644 --- a/src/southbridge/intel/bd82x6x/me_8.x.c +++ b/src/southbridge/intel/bd82x6x/me_8.x.c @@ -234,13 +234,12 @@ static int mei_send_msg(struct mei_header *mei, struct mkhi_header *mkhi, return mei_wait_for_me_ready(); } -static int mei_recv_msg(struct mkhi_header *mkhi, - void *rsp_data, int rsp_bytes) +static int mei_recv_msg(struct mkhi_header *mkhi, void *rsp_data, int rsp_bytes) { struct mei_header mei_rsp; struct mkhi_header mkhi_rsp; struct mei_csr me, host; - unsigned int ndata, n/*, me_data_len*/; + unsigned int ndata, n; unsigned int expected; u32 *data; -- cgit v1.2.3