From patchwork Thu May 20 09:19:27 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: 443189 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp2129768jac; Thu, 20 May 2021 02:54:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdCVz+VB8GZ9F3NwtRJcN+NhC2c3NgQz/oE6cdEbi+d/G7u8IJvG+id4uutlRs5dwYAHlT X-Received: by 2002:a05:6e02:1c87:: with SMTP id w7mr4681903ill.25.1621504486153; Thu, 20 May 2021 02:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621504486; cv=none; d=google.com; s=arc-20160816; b=YODEpSG/yMGE/eHsGEx81VHTbk5Ft2psqyfLK4dTPKsUyDKvwDeAUrlfzPmsuU414K oM1z0N94z314/P5XYcDKNdrovQoq/J26QirwT1k5jXkEXYPKw+HPKVYiUsxY6wazWhs0 f3aiOexWsnNI3MllloMf4UeBOlgElThUqju8Y+uZ3B3jCqrOwHA0wFHN3W2PYYkX6d0U XKorHWs1ciGhG13NIlwccQNFpOM5FQydcm7RsGHh8a/ad8iqncUR4xF/uk+Zr/BzduFm iAawBaMbNdK8cQmbfJ/Xnxf3n5Erz7n6pT0dsQae+ItY1jMXHnBntk+GzCfA4Lc5jtOS ayEA== 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=8YSEVg7g8LtgPGgakzSO22ACHVXsTr6xwxlpntKRn9o=; b=Rm69+FiWg+zYNiYvmEAvWSU5UosYagFfrBBQYNIw4jjZp0A/ThLMFRDv4YjATOxwDH 3QzObkNmliJoALbkHKqTOwTPZ3s7ih+kL3wR1ammg0mm+w0/owDGoCSbRIPyQPJ2NVeJ kmKzLMysdI8ifvXy/o/9rD4GiRjI3thUyU3yOk4v9NNDQSm9AsgQg8amnGFL2t/P70mC bev1yotMCbHFKQ5t7+KHhIgQoRlcOf2VJdhVsZH7Pd9abcbshA3N0If/7PT8DlzR8PL7 Y/dQjWtk57AlT5NsYmZH8DNMJdZvpSnA63aGgoKgAo8pNCRAZXWFjPb7mu4ZRjD5jHlT 8bgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XEHtx0lZ; 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 w36si1802867jal.44.2021.05.20.02.54.45; Thu, 20 May 2021 02:54:46 -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=XEHtx0lZ; 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 S234047AbhETJ4A (ORCPT + 12 others); Thu, 20 May 2021 05:56:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:52778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234480AbhETJxE (ORCPT ); Thu, 20 May 2021 05:53:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E8B0461400; Thu, 20 May 2021 09:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503385; bh=m1vL3u7Nu9yN3wcf9JURZ6g7jP/15N59Q6n6zipHSyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEHtx0lZaSnHRVl2s7BliNfBGn+tgn0UVULta3YZLK2sPGaTYoLSS33qUP3HVQGDV kTNy/W3HAe0+U6s3f9VKd97OOPG/Gsv1xGN78WS7QqU8Zsi0en0We3QRUZz+o+F7wP lkGuiwnswikRCXeEk6MFGndwkVmE0aaA+mRZYn6Y= 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 4.19 198/425] irqchip/gic-v3: Fix OF_BAD_ADDR error handling Date: Thu, 20 May 2021 11:19:27 +0200 Message-Id: <20210520092137.925845817@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 fbfa7ff6deb1..9d011281d4b5 100644 --- a/drivers/irqchip/irq-gic-v3-mbi.c +++ b/drivers/irqchip/irq-gic-v3-mbi.c @@ -297,7 +297,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; }