Message ID | 20220427094941.291554-7-michal.orzel@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen: Remove unused-but-set variables | expand |
Hi, On 27/04/2022 10:49, Michal Orzel wrote: > Currently function xgene_check_pirq_eoi assignes a return value of Typo: s/assignes/assigns/ also I think s/a return/the return/ > dt_device_get_address to a variable res but does not make use of it. > Fix it by making use of res in a condition checking the result of a Typo: s/a condition/the condition/ I think. > call to dt_device_get_address instead of checking the address > stored in dbase. > > Signed-off-by: Michal Orzel <michal.orzel@arm.com> Reviewed-by: Julien Grall <jgrall@amazon.com> Cheers, > --- > xen/arch/arm/platforms/xgene-storm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c > index fced4d7c2c..befd0c3c2d 100644 > --- a/xen/arch/arm/platforms/xgene-storm.c > +++ b/xen/arch/arm/platforms/xgene-storm.c > @@ -51,7 +51,7 @@ static void __init xgene_check_pirq_eoi(void) > panic("%s: Can not find interrupt controller node\n", __func__); > > res = dt_device_get_address(node, 0, &dbase, NULL); > - if ( !dbase ) > + if ( res ) > panic("%s: Cannot find a valid address for the distributor\n", __func__); > > /*
diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c index fced4d7c2c..befd0c3c2d 100644 --- a/xen/arch/arm/platforms/xgene-storm.c +++ b/xen/arch/arm/platforms/xgene-storm.c @@ -51,7 +51,7 @@ static void __init xgene_check_pirq_eoi(void) panic("%s: Can not find interrupt controller node\n", __func__); res = dt_device_get_address(node, 0, &dbase, NULL); - if ( !dbase ) + if ( res ) panic("%s: Cannot find a valid address for the distributor\n", __func__); /*
Currently function xgene_check_pirq_eoi assignes a return value of dt_device_get_address to a variable res but does not make use of it. Fix it by making use of res in a condition checking the result of a call to dt_device_get_address instead of checking the address stored in dbase. Signed-off-by: Michal Orzel <michal.orzel@arm.com> --- xen/arch/arm/platforms/xgene-storm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)