[Skiboot-stable] [PATCH v2 2/5] test-ipmi-hiomap: Assert if size is zero

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Apr 8 16:05:38 AEST 2019


Cc: Andrew Jeffery <andrew at aj.id.au>
Cc: skiboot-stable at lists.ozlabs.org
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 libflash/test/test-ipmi-hiomap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c
index dc855c5a1..bf31a0e72 100644
--- a/libflash/test/test-ipmi-hiomap.c
+++ b/libflash/test/test-ipmi-hiomap.c
@@ -205,8 +205,9 @@ int ipmi_sel_register(uint8_t oem_cmd __attribute__((unused)),
 int64_t lpc_write(enum OpalLPCAddressType addr_type __attribute__((unused)),
 		  uint32_t addr __attribute__((unused)),
 		  uint32_t data __attribute__((unused)),
-		  uint32_t sz __attribute__((unused)))
+		  uint32_t sz)
 {
+	assert(sz != 0);
 	return 0;
 }
 
-- 
2.14.3



More information about the Skiboot-stable mailing list