Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 025A6C433F5 for ; Wed, 27 Apr 2022 09:50:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.314686.532923 (Exim 4.92) (envelope-from ) id 1njeJC-0001qA-Fa; Wed, 27 Apr 2022 09:50:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 314686.532923; Wed, 27 Apr 2022 09:50:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njeJC-0001pU-AS; Wed, 27 Apr 2022 09:50:06 +0000 Received: by outflank-mailman (input) for mailman id 314686; Wed, 27 Apr 2022 09:50:04 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njeJA-0008Li-MV for xen-devel@lists.xenproject.org; Wed, 27 Apr 2022 09:50:04 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 695eb213-c60f-11ec-8fc2-03012f2f19d4; Wed, 27 Apr 2022 11:50:03 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 54D7014BF; Wed, 27 Apr 2022 02:50:03 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.13.174]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C278B3F774; Wed, 27 Apr 2022 02:50:01 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 695eb213-c60f-11ec-8fc2-03012f2f19d4 From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH 6/8] platforms/xgene: Make use of dt_device_get_address return value Date: Wed, 27 Apr 2022 11:49:39 +0200 Message-Id: <20220427094941.291554-7-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220427094941.291554-1-michal.orzel@arm.com> References: <20220427094941.291554-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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__); /* -- 2.25.1