From patchwork Wed May 12 14:45:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 435571 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4944957jao; Wed, 12 May 2021 08:41:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKRVTcBC90K2za7gjfufkCSynG3B/s6O/kgOk/NVITeAMCCpN6+NagWxhhkXqLHIFyCWGD X-Received: by 2002:a2e:b8d6:: with SMTP id s22mr85283ljp.117.1620834110850; Wed, 12 May 2021 08:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620834110; cv=none; d=google.com; s=arc-20160816; b=BIP2dqFQ3FIM41sfOmTCYlIN3ZSGN0Qn55k0vqDwJ2ajVcz0wYCTrA408wA3WFvMy2 b0GTPkkTp/w8w1brY5amAgidRFY8UeA3pl9ynPA8iGLYYVIvBFtq0V7CY8hRVzx8zMne vK40VZVpQu36LZBZo+BqPbUo0Ht0HEDNJs4YXHguL4MiJQK6q3KBXU4f3/G6sRboychR H5c/MXVjgDdKjX6oDffTiipk7ZOeI9HRV0YV1j63EKftT3QPzqZxJGnMqMB1sfUAPAxV FFfMoqXtb1bZqllMk4mX3lJKaYitmWGabqJrRwhsU+sEQv8M60zy7JQFuR76qMmhN1EE SdYw== 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=fRwKmDYl4/6EzxyHa0vO4WtSEQsjMUK3hiTjGKV/tQrOXm2GaWpTr/VAn9OCy0AWOS gM6bg+IH9EWMFBbxdVB6QWlbFjvakDb3/DOiHEF/U8p2//CVgpmCVg5xUl2lif1oYqVo D43sxtee377rDpCb3heMtX1sbAY6bW1SpgVkFz3te0uCkoUGXrRWzdJiC/SIoz2j/YSz 3afJz7XMWmkERjcj1YIcSz2p1NYIaDSmfEZBMDcwBJXyjvR0vYkZw2+az3ujv87MWGmA Az9ZVH9ZfqY9qEur6TXy3o28J3dWPTqAXZ+IvH13WsJrvatwV9tanroJo1196zEQvQ2e GQcA== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 m20si100438lji.284.2021.05.12.08.41.50; Wed, 12 May 2021 08:41:50 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S234576AbhELPdN (ORCPT + 12 others); Wed, 12 May 2021 11:33:13 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 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; }