From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 003B8C43460 for ; Wed, 7 Apr 2021 12:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF77B611EE for ; Wed, 7 Apr 2021 12:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352271AbhDGMie (ORCPT ); Wed, 7 Apr 2021 08:38:34 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:36386 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245566AbhDGMiY (ORCPT ); Wed, 7 Apr 2021 08:38:24 -0400 Date: Wed, 07 Apr 2021 12:38:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1617799094; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YpazOy5WMoaQocENGwsTuJoSihbm3EtZrdg/3sFERII=; b=kDKnvwrDQh0wi599YY6hLT48sMrQsdizRR7tCx0kfFJXEFmwZ+c/bUbdaZMwIwP0Gg/vjg U/ZyIw0sQhyDJXogQAtssD21BS890Z7oV/hJ/o1AgkOPYDnNQqAp0jji9FGkMxFOBj8KGy 9xHR4+ZR4dOic9IH1F2EaStIewMuHK6XMO7eCEg67UmNX/39O7mKdmAX32gDgYv1XQsRpK fc62D3ScyAeFhxqO3xH6iOUnIxOnbGjV2ZtENf+1L10UTmcdGFnJbQGTwVylMvx43okMqU 9KpNekSf3s0MHfzSQPbaQckTZqDWWIWQPO/TrjFLiaDZXDyJBOh9NAUl4SkoYQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1617799094; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YpazOy5WMoaQocENGwsTuJoSihbm3EtZrdg/3sFERII=; b=jH3CLNthXEs8JD7kva+0bbX7sNDG77q3hMcQ5eBjJFuvKHBfqrlLgH2DTrKlSrUTil9e5h 5Do/iqH8VL2OQMAw== From: "irqchip-bot for Arnd Bergmann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/gic-v3: Fix OF_BAD_ADDR error handling Cc: Arnd Bergmann , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20210323131842.2773094-1-arnd@kernel.org> References: <20210323131842.2773094-1-arnd@kernel.org> MIME-Version: 1.0 Message-ID: <161779909366.29796.10784806676911385698.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 8e13d96670a4c050d4883e6743a9e9858e5cfe10 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/8e13d96670a4c050d4883e6743a9e9858e5cfe10 Author: Arnd Bergmann AuthorDate: Tue, 23 Mar 2021 14:18:35 +01:00 Committer: Marc Zyngier CommitterDate: Wed, 07 Apr 2021 13:25:52 +01:00 irqchip/gic-v3: Fix OF_BAD_ADDR error handling When building with extra warnings enabled, clang points out a mistake in the error handling: drivers/irqchip/irq-gic-v3-mbi.c:306:21: error: result of comparison of constant 18446744073709551615 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (mbi_phys_base == OF_BAD_ADDR) { Truncate the constant to the same type as the variable it gets compared to, to shut make the check work and void the warning. Fixes: 505287525c24 ("irqchip/gic-v3: Add support for Message Based Interrupts as an MSI controller") Signed-off-by: Arnd Bergmann Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210323131842.2773094-1-arnd@kernel.org --- drivers/irqchip/irq-gic-v3-mbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-mbi.c b/drivers/irqchip/irq-gic-v3-mbi.c index 563a9b3..e81e89a 100644 --- a/drivers/irqchip/irq-gic-v3-mbi.c +++ b/drivers/irqchip/irq-gic-v3-mbi.c @@ -303,7 +303,7 @@ int __init mbi_init(struct fwnode_handle *fwnode, struct irq_domain *parent) reg = of_get_property(np, "mbi-alias", NULL); if (reg) { mbi_phys_base = of_translate_address(np, reg); - if (mbi_phys_base == OF_BAD_ADDR) { + if (mbi_phys_base == (phys_addr_t)OF_BAD_ADDR) { ret = -ENXIO; goto err_free_mbi; }