[PATCH v1 2/5] discover/platform-powerpc: Fix build warning

Geoff Levand geoff at infradead.org
Mon Apr 27 13:38:31 AEST 2020


Fix bad pointer assignment when coping mailbox data:

  warning: assignment to ‘uint8_t *’ from incompatible pointer type ‘uint8_t (*)[13]’

Signed-off-by: Geoff Levand <geoff at infradead.org>
---
 discover/platform-powerpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
index c6ab416..bcb18e1 100644
--- a/discover/platform-powerpc.c
+++ b/discover/platform-powerpc.c
@@ -564,7 +564,7 @@ static int get_ipmi_boot_mailbox(struct platform_powerpc *platform,
 			 * Enterprise ID number
 			 */
 			block_size -= CHASSIS_BOOT_MBOX_IANA_SZ;
-			boot_opt_data = &mailbox.b0.data;
+			boot_opt_data = mailbox.b0.data;
 
 			/* Check IANA matches the IBM number, '2' */
 			if (mailbox.b0.iana[0] != 0x02 ||
@@ -577,7 +577,7 @@ static int get_ipmi_boot_mailbox(struct platform_powerpc *platform,
 				return -1;
 			}
 		} else {
-			boot_opt_data = &mailbox.data;
+			boot_opt_data = mailbox.data;
 		}
 
 		mailbox_buffer = talloc_realloc(platform, mailbox_buffer,
-- 
2.20.1




More information about the Petitboot mailing list