diff mbox

[kvm-unit-tests,v3,01/17] arm/arm64: trivial: another assert fix

Message ID 1455380910-30604-2-git-send-email-drjones@redhat.com
State Superseded
Headers show

Commit Message

Andrew Jones Feb. 13, 2016, 4:28 p.m. UTC
Signed-off-by: Andrew Jones <drjones@redhat.com>

---
Unrelated to the powerpc initial drop, but found it while working
on that, so just posting it now. Anyway, it's a trivial fix.
---
 lib/arm/io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

David Gibson Feb. 14, 2016, 10:55 p.m. UTC | #1
On Sat, Feb 13, 2016 at 05:28:14PM +0100, Andrew Jones wrote:
> Signed-off-by: Andrew Jones <drjones@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> 
> ---
> Unrelated to the powerpc initial drop, but found it while working
> on that, so just posting it now. Anyway, it's a trivial fix.
> ---
>  lib/arm/io.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/arm/io.c b/lib/arm/io.c
> index a08d394e4aa1c..a111530f4802d 100644
> --- a/lib/arm/io.c
> +++ b/lib/arm/io.c
> @@ -50,7 +50,8 @@ static void uart0_init(void)
>  		}
>  
>  	} else {
> -		assert(dt_pbus_translate_node(ret, 0, &base) == 0);
> +		ret = dt_pbus_translate_node(ret, 0, &base);
> +		assert(ret == 0);
>  	}
>  
>  	uart0_base = ioremap(base.addr, base.size);
Thomas Huth Feb. 15, 2016, 6:38 a.m. UTC | #2
On 13.02.2016 17:28, Andrew Jones wrote:
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> 
> ---
> Unrelated to the powerpc initial drop, but found it while working
> on that, so just posting it now. Anyway, it's a trivial fix.
> ---
>  lib/arm/io.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/arm/io.c b/lib/arm/io.c
> index a08d394e4aa1c..a111530f4802d 100644
> --- a/lib/arm/io.c
> +++ b/lib/arm/io.c
> @@ -50,7 +50,8 @@ static void uart0_init(void)
>  		}
>  
>  	} else {
> -		assert(dt_pbus_translate_node(ret, 0, &base) == 0);
> +		ret = dt_pbus_translate_node(ret, 0, &base);
> +		assert(ret == 0);
>  	}
>  
>  	uart0_base = ioremap(base.addr, base.size);

Reviewed-by: Thomas Huth <thuth@redhat.com>

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/arm/io.c b/lib/arm/io.c
index a08d394e4aa1c..a111530f4802d 100644
--- a/lib/arm/io.c
+++ b/lib/arm/io.c
@@ -50,7 +50,8 @@  static void uart0_init(void)
 		}
 
 	} else {
-		assert(dt_pbus_translate_node(ret, 0, &base) == 0);
+		ret = dt_pbus_translate_node(ret, 0, &base);
+		assert(ret == 0);
 	}
 
 	uart0_base = ioremap(base.addr, base.size);