[Skiboot-stable] [PATCH v2 4/5] test-ipmi-hiomap: Fix lpc-read-success

Andrew Jeffery andrew at aj.id.au
Tue Apr 9 10:57:04 AEST 2019



On Mon, 8 Apr 2019, at 15:36, 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>

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

> ---
>  libflash/test/test-ipmi-hiomap.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libflash/test/test-ipmi-hiomap.c 
> b/libflash/test/test-ipmi-hiomap.c
> index b8f24a9b0..abc97779c 100644
> --- a/libflash/test/test-ipmi-hiomap.c
> +++ b/libflash/test/test-ipmi-hiomap.c
> @@ -222,10 +222,12 @@ int64_t lpc_read(enum OpalLPCAddressType 
> addr_type __attribute__((unused)),
>  
>  static bool lpc_read_success(const uint8_t *buf, size_t len)
>  {
> -	if (len < 64)
> +	if (len < 64) {
>  		while (len--)
>  			if (*buf++ != 0xaa)
>  				return false;
> +		return true;
> +	}
>  
>  	for (int i = 0; i < 64; i++)
>  		if (buf[i] != 0xaa)
> -- 
> 2.14.3
> 
>


More information about the Skiboot-stable mailing list