Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3353214rwa; Tue, 23 Aug 2022 03:25:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR6FQpzu362FhLsJG2y6GPFkuhHClvhRloJgdHqYeEXyEoDlyhISdhJCAgcxsRxJq+2TEfw8 X-Received: by 2002:a17:907:75d6:b0:73d:7c31:9ac4 with SMTP id jl22-20020a17090775d600b0073d7c319ac4mr6734581ejc.393.1661250306567; Tue, 23 Aug 2022 03:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661250306; cv=none; d=google.com; s=arc-20160816; b=R4huSbS3lcNW8uPat3huGYbZClb0ms31RetY68FN+e1crLT2mceM5wqgiYNHcnc0sP N3iseJeZT6+r8h5/81FywbV2s4m6rpoyUXuJXx52Gfq6Op83NC9f06CnqLBlm6W/F7U7 i6u5AK6A1ZqiCVuStMWQiNKDvPGG4bDEF4uWopboCy+5bWlyTzPgAkL56Vxsy1R4+guP vesXi6uKc2exhv/QdJ5LN2oArhoR+r8j7VD7qECsLNH8JzBZr8WNR00alFJUJdC5h/h8 IzkMwIfRa38WJglkiguvawxu8nQYuO3Q02CEnwc+CI9zscw5SOCFnmq+VFUUX7VJsktG 2sOQ== 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=xUKkc5JgM6qUMxhZak1WhbVticaiyqS0lBJyhBans0c=; b=rfCyQMJlgUf3joN0x31npvOTWe37e4XQpLRHoGtDPWnkEbQemiK115Pm0qqC5QenW7 vVPmooPHlpd0Zng21Z+LJy9n7sdJYhOt/bxpD5bGDkVoBiKfHkTe9oHRtmZT09gyMEwM B96K3LtZBp37/KnNQ84vm/F0YEkoLaockRS/jYKU0G/dSI1YpfUHJpYQJf4c1HjHLr2W fyQpVk2HzKGzV8tvW8kFNoiUJeLxCA//Tp+JmsnEbjtsHFYkL4tKrqoL2tFpkMHdPzDn ju+oG7fZhegihUp4n2n0S8owZ7/NLjUYQPmBVr4jBJFB4h+uwf25iYI0PqNwbDiLuPly Alyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V9HygLq8; 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 ht16-20020a170907609000b0073159f049ddsi12115695ejc.659.2022.08.23.03.24.40; Tue, 23 Aug 2022 03:25:06 -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=V9HygLq8; 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 S1354410AbiHWKVZ (ORCPT + 99 others); Tue, 23 Aug 2022 06:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352919AbiHWKJe (ORCPT ); Tue, 23 Aug 2022 06:09:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D9477DF5D; Tue, 23 Aug 2022 01:55:31 -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 19B126155E; Tue, 23 Aug 2022 08:55:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2455BC433C1; Tue, 23 Aug 2022 08:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244930; bh=yx3F4GWmfbblmgPgIsm34N4nZ3rzz+7Tif+D4H6tSck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V9HygLq8Zg1xlIekN1N741nqHfKBoNC1KYZMbW8m+MzYQdQIlrfQV5N0dKJDtTgSl 1oK/YU6rljiTXvCYpdi7pIKuVGN/A7bWwGCUmudKDI7h0GPEdexXo4us4FcZ4qdLYt 8wrFqsfKI2Am2ak2dj4xC105G5WIGKoS5VC/Nnqk= 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 4.14 213/229] irqchip/tegra: Fix overflow implicit truncation warnings Date: Tue, 23 Aug 2022 10:26:14 +0200 Message-Id: <20220823080101.247244113@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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 0abc0cd1c32e..1b3048ecb600 100644 --- a/drivers/irqchip/irq-tegra.c +++ b/drivers/irqchip/irq-tegra.c @@ -157,10 +157,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); @@ -181,12 +181,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); } @@ -321,7 +321,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