diff mbox series

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

Message ID 20190408060541.11246-2-hegdevasant@linux.vnet.ibm.com
State Accepted
Delegated to: Vasant Hegde
Headers show
Series [v2,1/5] libflash/ipmi-hiomap: Fix blocks count issue | expand

Commit Message

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

Comments

Andrew Jeffery April 9, 2019, 12:52 a.m. UTC | #1
On Mon, 8 Apr 2019, at 15:35, Vasant Hegde wrote:
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: skiboot-stable@lists.ozlabs.org
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

> ---
>  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
> 
>
diff mbox series

Patch

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;
 }