Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4609577pxj; Wed, 12 May 2021 09:10:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDopKh/31aAaOU0YSgj1UId5HiiCwbHo8gasrmph7BmbUz9VCk8j7TenwJCICWrYXf92ty X-Received: by 2002:aca:385:: with SMTP id 127mr8021224oid.143.1620835858640; Wed, 12 May 2021 09:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835858; cv=none; d=google.com; s=arc-20160816; b=E8M3IslXKahM1oyPmXTzIUA04P8Wev3ysFHYyDJzWy/Z1rDI6aDfdV4vzDvASwebYo 9NTUZ8w63k1s9sjzF7gzxdTT+qFgxbK94xPjoK87PoYyt5xrZ60zndX+5SZdO36zGHJU CHE5IygrfDpxhQlcppwicO4lC88D34c0EEJQ+PEbMoi5CM0G4qNmUz9LTZoWiAqZMdFu QM38DVlfC2fodOvYjKiPdjrbrJRiZJXVPQ8X2pw4Yp3I1qv+RAch2zmuZ9m/XLxdv5mX hRvDsRyIx5TOlUgs+WPUXORSwOVtzzVKsKKw44SfIvSEagbooa/uTDf5oparbQeWPX+q zvqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JD/OJSVOkAxdRWq6datypAJHO7a2mOauubOjDD8X1Cs=; b=hyjggOT2lpDtA5B8HS/HvUeZTXKQuGR8ZVmGgmW4qGdgvLoRnWBBtvvdeOWITPgjit /KeWO00hLC2U4+57x36KcWziqDMnaAZRsalVJ0fcuMdvbV22Uz9bL2VlC919A440QxdF cF28Py+FBBNkDh/Bk7bGF4SzcSg4h+EJxshaqD9MakxD+b3pwVRygRLBllrzwApHZVEG 6m0v5A7wnrKDA4RwpmckLQvAxQvfi97XX39c7q0D5RL4fedccwspQ4coLUC0o5Qakxkx Te5P2C8jUEnWWvxmcNiavLLtlbykyZfGnQ4I7QckZxcD4CfMO1s+IT/mFQKnSHab1VLQ 5tcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=auTQosn5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si212451oia.149.2021.05.12.09.10.45; Wed, 12 May 2021 09:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=auTQosn5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238839AbhELQGb (ORCPT + 99 others); Wed, 12 May 2021 12:06:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:40992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234926AbhELPZz (ORCPT ); Wed, 12 May 2021 11:25:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AEEA461625; Wed, 12 May 2021 15:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832264; bh=e3OOcQJpqFZGaR6u1gY8aZUXjS+i30BuumWbEPhDvuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=auTQosn5N6Y2qQfjJcOyIBq1tBI4EJVK7yL6aiE2TgKeLmhGCYg1unQeD8gRWeKt2 GhhuUQNAlkBQQdljUZRdWqHHWVZvif1dcb4RLvT2Wrj8kO8Ze4WPjMH/DhTFaRACWt 2bevhJfmU4uwd38bCvvHUUXmzRUMZ8tM7Mwfb2lo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Marc Zyngier , Sasha Levin Subject: [PATCH 5.10 208/530] irqchip/gic-v3: Fix OF_BAD_ADDR error handling Date: Wed, 12 May 2021 16:45:18 +0200 Message-Id: <20210512144826.676611963@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 8e13d96670a4c050d4883e6743a9e9858e5cfe10 ] 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 Signed-off-by: Sasha Levin --- 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 563a9b366294..e81e89a81cb5 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; } -- 2.30.2