Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3397504rwa; Tue, 23 Aug 2022 04:13:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR5bZ5+ldm98Wm6cz0cLnSNq7tTezaaTxGbe9C1q469NLhNY6bYQY07BDHxrGLpC7iR34BBW X-Received: by 2002:a17:903:2410:b0:171:4bbc:2526 with SMTP id e16-20020a170903241000b001714bbc2526mr23817320plo.62.1661253218947; Tue, 23 Aug 2022 04:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253218; cv=none; d=google.com; s=arc-20160816; b=YO1ULjXDmwkfZQEtXUfkXaMeSrVtj+c546wg7bFR21Rp6E9pvA5f6DzU75SCUqrySh R0XVzhWkAJ9dnRGcSCJQZU7atbHNeiNTEtgIOKRjicCcHbW+T8p5BExw/k2UtE74G4JO Ws84h0Asdh2piUC2lz5Ygc4O9hHwGReftbdt9wh7xm//Wx7gXrS0suaoJyycq5qur3aK JcEnjuCJJTzfbYX7xvuVaOPCgNY+Ar4xFElwuiR4geyY/JOLNQxzxrKaDiKHByqAMl98 EjjMvEhEp/6YyCslshhlhFJ2pgsU1RMHfpGG3mwees7FDJxhNqIZuj8SkjpcgUwWyquC 1YXg== 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=Mt2htISRwg57eEclu52zuWZkRqt5atJhLGp8pNJ2UIY=; b=rFJMe7kIf1NADlZsCkjOYg4jN3A3yBWBGLxg3PGit9X0h1DUF7DbbSpX81xuHWtSlr TBAGJxva+Az9QENqINgBDoyzDNrZAExCB8k92WYWWYS88Y5dMZY1qdMzkNbN8Hn6iDBi JppYfSj1xL2GSkPp0RRUEoWftGNitAZB2nn5Y7H/SwpTOKyYX9EHLFT9pJYKRj1YF8Be nW1UWwsdIoQSwuWS1Lmp16QYGORDX3DusJx/hkFBlw3h+70Bz4RCFxbZIWd0lQjdylB2 jJMw3KrWGnB5SQjDYpjSwzHC3KY4VoaQvRQhpOBzsCGECrttQ/7jTp2LyOTm5W9JHUm2 Fojg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qh6DvLMB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq7-20020a17090b380700b001ecfcc0a97dsi20046235pjb.71.2022.08.23.04.13.27; Tue, 23 Aug 2022 04:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qh6DvLMB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S242292AbiHWJQ7 (ORCPT + 99 others); Tue, 23 Aug 2022 05:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348937AbiHWJNh (ORCPT ); Tue, 23 Aug 2022 05:13:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59DF66D9CF; Tue, 23 Aug 2022 01:31:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 02A4061257; Tue, 23 Aug 2022 08:31:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A29BC433D6; Tue, 23 Aug 2022 08:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243511; bh=hRPBfczdm15C8/gZO/F3YClMCpGorCXgOhAyyTX1B+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qh6DvLMB6e2BI6MgVL9qMgI2KqwLa3zZp6xVfGm9jNh9fBRzWixGtIZvvnJJrlAH8 ytzGHHlMQR2/dCGCMczfoqNHhMG6iOI1NAuUsDA40B3XasITqDBnRt/09aO+Ro4bxt zjQZoAB2NABzZ4DRtio/y9oDK4kEz5820pklYxDc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Sai Prakash Ranjan , Arnd Bergmann , Sasha Levin Subject: [PATCH 5.19 270/365] irqchip/tegra: Fix overflow implicit truncation warnings Date: Tue, 23 Aug 2022 10:02:51 +0200 Message-Id: <20220823080129.470780022@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sai Prakash Ranjan [ Upstream commit 443685992bda9bb4f8b17fc02c9f6c60e62b1461 ] Fix -Woverflow warnings for tegra irqchip driver which is a result of moving arm64 custom MMIO accessor macros to asm-generic function implementations giving a bonus type-checking now and uncovering these overflow warnings. drivers/irqchip/irq-tegra.c: In function ‘tegra_ictlr_suspend’: drivers/irqchip/irq-tegra.c:151:18: warning: large integer implicitly truncated to unsigned type [-Woverflow] writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); ^ Suggested-by: Marc Zyngier Signed-off-by: Sai Prakash Ranjan Reviewed-by: Arnd Bergmann Cc: Marc Zyngier Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- drivers/irqchip/irq-tegra.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c index e1f771c72fc4..ad3e2c1b3c87 100644 --- a/drivers/irqchip/irq-tegra.c +++ b/drivers/irqchip/irq-tegra.c @@ -148,10 +148,10 @@ static int tegra_ictlr_suspend(void) lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS); /* Disable COP interrupts */ - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR); /* Disable CPU interrupts */ - writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR); /* Enable the wakeup sources of ictlr */ writel_relaxed(lic->ictlr_wake_mask[i], ictlr + ICTLR_CPU_IER_SET); @@ -172,12 +172,12 @@ static void tegra_ictlr_resume(void) writel_relaxed(lic->cpu_iep[i], ictlr + ICTLR_CPU_IEP_CLASS); - writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR); writel_relaxed(lic->cpu_ier[i], ictlr + ICTLR_CPU_IER_SET); writel_relaxed(lic->cop_iep[i], ictlr + ICTLR_COP_IEP_CLASS); - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); + writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR); writel_relaxed(lic->cop_ier[i], ictlr + ICTLR_COP_IER_SET); } @@ -312,7 +312,7 @@ static int __init tegra_ictlr_init(struct device_node *node, lic->base[i] = base; /* Disable all interrupts */ - writel_relaxed(~0UL, base + ICTLR_CPU_IER_CLR); + writel_relaxed(GENMASK(31, 0), base + ICTLR_CPU_IER_CLR); /* All interrupts target IRQ */ writel_relaxed(0, base + ICTLR_CPU_IEP_CLASS); -- 2.35.1