Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1347801pxm; Thu, 24 Feb 2022 01:03:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCIk7pZPCZadOSrC46fen/1rkAFr2vuiiI/e+sYdvFoGCZ05NF+kyTJMAuQE1jAn1EdMUg X-Received: by 2002:a17:906:ad90:b0:6cf:74f1:a34 with SMTP id la16-20020a170906ad9000b006cf74f10a34mr1438508ejb.175.1645693439355; Thu, 24 Feb 2022 01:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645693439; cv=none; d=google.com; s=arc-20160816; b=Awl+LSWeYbr1cyPFB2OUNDfYG0wu1oiF8XITzvHho5duuYDp1Vnvelu+NRhsG6OZH2 /wtmKRQMkjzhn7bohpvBNi9WzEzq8XrpXR7m7VmqioTJ+g+h+W+BwfvFWnzo+IyJoX14 cXGdo5b5YDAmruZewpHmC1fKMrT6wHA1vm/t8sBBEBdnljeFlsFYH4Y28mhmoBDPRqDV Yiraqy+1VaIHSaegrtMqM1hEmCnlgem1wOS9co3kVXbnUUxNkj0rAMeqwexQwjXbtv4G vrZRWIy3eaioNs2BFLOs2UZWJqPDL0fge4exK6l3t1BhNkzQEc7w2ovYQyOFhTnMjpqN utpg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oiJlEqYi2G/M1ak/+E9q5Pf4TyGwzZSyE0d92xpEqUI=; b=PNBdissRU3eHUlxwXwCOqCQkCUoF8oDst8G++F31W55GN5ogVaaYG8MIfF8ROzS/eQ 1/jwQarm+GJXuvJhh4/bIAuNxSERFnsbuej2IuJecgRcUbSVqguN+XtO5aFjJXTafNLi zpAv5tbqvO9X8CfKiyChkl0GqNff317EfsH420olveoyKM8bUOXkRtuT3+DK4q0HKfGk eFv0oEzL6Ak1AIdhMka7y1y8FH4Eh5yL+cJ122LLufdpp/1w1/1dpwAK1acbwI4ZqHaD UudLSFJTo0YSrMoKZJlTDSEfk/jOxDnf5iGlL+uNITtSEN6xwH5Ehly3rLx2ek44LabM vcqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ETlf7FZh; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1si1227002edk.317.2022.02.24.01.03.32; Thu, 24 Feb 2022 01:03:59 -0800 (PST) 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=@quicinc.com header.s=qcdkim header.b=ETlf7FZh; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231174AbiBXGIU (ORCPT + 99 others); Thu, 24 Feb 2022 01:08:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbiBXGIS (ORCPT ); Thu, 24 Feb 2022 01:08:18 -0500 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01D7EB8212; Wed, 23 Feb 2022 22:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645682869; x=1677218869; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oiJlEqYi2G/M1ak/+E9q5Pf4TyGwzZSyE0d92xpEqUI=; b=ETlf7FZhJMbbBsK6RwYj8hFoKhag45oZZ900A3wtVVH0t5BvCJfRO9Bu gowsP7N7+9UYpJmoru4Ua6yEfgG8RCjEsFRgvQoIf1XfUofwW8o/Dptb5 HgrppBEDrMrIlte3b2MIMdIgsFokHjIGAAIK/rQm0eH0EtqYfmn+0f2au U=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 23 Feb 2022 22:07:48 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 22:07:48 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 23 Feb 2022 22:07:48 -0800 Received: from blr-ubuntu-253.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 23 Feb 2022 22:07:44 -0800 From: Sai Prakash Ranjan To: Will Deacon , Catalin Marinas , Arnd Bergmann , Steven Rostedt , "Marc Zyngier" CC: Trilok Soni , , gregkh , , , , "Sai Prakash Ranjan" Subject: [PATCHv10 3/6] irqchip/tegra: Fix overflow implicit truncation warnings Date: Thu, 24 Feb 2022 11:37:05 +0530 Message-ID: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 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); ^ Cc: Marc Zyngier Suggested-by: Marc Zyngier Reviewed-by: Arnd Bergmann Signed-off-by: Sai Prakash Ranjan --- 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.33.1