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

Andrew Jeffery andrew at aj.id.au
Mon Apr 8 12:05:39 AEST 2019



On Fri, 5 Apr 2019, at 00:03, Vasant Hegde wrote:
> 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 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libflash/test/test-ipmi-hiomap.c 
> b/libflash/test/test-ipmi-hiomap.c
> index dc855c5a1..c4cc76d8c 100644
> --- a/libflash/test/test-ipmi-hiomap.c
> +++ b/libflash/test/test-ipmi-hiomap.c
> @@ -207,6 +207,7 @@ int64_t lpc_write(enum OpalLPCAddressType addr_type 
> __attribute__((unused)),
>  		  uint32_t data __attribute__((unused)),
>  		  uint32_t sz __attribute__((unused)))
>  {
> +	assert(sz != 0);

Need to drop the __attribute__((unused)) from sz, otherwise it's misleading.

>  	return 0;
>  }
>  
> -- 
> 2.14.3
> 
>


More information about the Skiboot-stable mailing list