Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3464406rwa; Tue, 23 Aug 2022 05:19:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR5NIshCF3yqlQO7E9mUTtd+4/ko5UK4+LFcDdLTNx3FpEzk+XQPjr43nwgx9n4WXKyPT+eM X-Received: by 2002:a17:902:d2c8:b0:172:f0a1:4d4d with SMTP id n8-20020a170902d2c800b00172f0a14d4dmr7477130plc.142.1661257154138; Tue, 23 Aug 2022 05:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257154; cv=none; d=google.com; s=arc-20160816; b=qqheNGvTy1J9vZ7vxYSEii5wrd8GrrAnDGEUmw4XmzceoatlWee9ObtAzOEQxEI1Uj WTJo1S5b462uhFuLh2lIwRU/cINX0l4NYhWDsgXgsCOuFcmz48LtueRt2L6825uBX2rk Dfc9NhOygd/Z27p1lj9JB9ZzorL9JlN2KY2y9gstZbQ9PYs91FcMytWbRWpF6BbIZhiX nd+pHc64objsoJWQtC1DKMGDuIL39C2tlFZZSoPvVp3bjc3MWyKOgRRnhH+ffu3TevMF 6Lc+H2a44SL005WMIo/QHxcywTKWjafuVNNMWYa41XsxbH5SV77I5/Xi75F5v9Ux1zaL ry+Q== 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=uQU+dfQM1TR8d563idBx2AIofO+ekgOTLCy7B85tcurlajoR8UuHALvHJGDFvalfKO wgYlYovfObaoKjJEBYJWUaCx8EZ4x87l7ZmYn3Dm8hJiEEK9B6AFjJnxP8RahB4nuHRO +e59O0WAjqasmiIbmiDSJDQhEJPoRFzyq6tXcYwluA4r0CKehxI6jZN+V2WOgFrs8hOt k7DYEet26EY+hOstlFsyaLJjPHsAmNnuWyqaicimho4+84lh2KnEYyye41mRcQy33SZb FJtbn2UfhaNCqDCFUFycf8TEdRyPODjGZywnIkyq51TEftYhProP37wXsAn3HIi0cXMv tkjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eO2Y2ehy; 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 f3-20020aa78b03000000b00535fd435cf6si12710046pfd.208.2022.08.23.05.19.03; Tue, 23 Aug 2022 05:19:14 -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=eO2Y2ehy; 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 S1354122AbiHWKU2 (ORCPT + 99 others); Tue, 23 Aug 2022 06:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352831AbiHWKJK (ORCPT ); Tue, 23 Aug 2022 06:09:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 269157D7AD; Tue, 23 Aug 2022 01:55:08 -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 ams.source.kernel.org (Postfix) with ESMTPS id CD05DB81C35; Tue, 23 Aug 2022 08:55:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18838C433C1; Tue, 23 Aug 2022 08:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244905; bh=hRPBfczdm15C8/gZO/F3YClMCpGorCXgOhAyyTX1B+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eO2Y2ehyYdbKfDXadZdTZ5ixjlGBFxE6qw+PumG4Pr2cN75gB+O60Cq0I2jS2J39X eYKYL7uQVCynUeW0Ly3p30cTYCSzDRBvCXu7CmGwNWMygduWJZTbrkNnUMoazqNgUO fmZdND0bjKHZHSQXm33ISb6G+eAAMT4f5RfNhG8s= 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.15 170/244] irqchip/tegra: Fix overflow implicit truncation warnings Date: Tue, 23 Aug 2022 10:25:29 +0200 Message-Id: <20220823080104.933936603@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@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