From patchwork Thu Jul 11 11:57:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 13730631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE41BC3DA4A for ; Thu, 11 Jul 2024 11:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EnO8Gjz8H8uyLvT1tlR+tW3ZQd5GGb1dL+gGDQfc384=; b=05S6DSdm6CVbR1UJgaLn4T/ZM2 s7jUmGNOgk4/G14lCzcmD1a2tR6X5FKfPk90k8ll9ZFgyUtTQF0SZLJrS5kR+2aK9HGwBLsD4aUhn j4QKDCabIqbmH+5+It3BoXHBR62gSzq/HEGDIImAyU73nXvMB0FFpODI2sBMvtRCjIJJOuYdi21rF Hf1gucWKhEqouVsavqevncqx6otG5lN4d2BxvH6PyfNrpxVJpYqGgC+N0CFO/3IYgiXRnvUhkPJk/ yyBJDjkfaLx9BkiVRtqugCQud+lI69xjExm6MVzFxZ1nFV8HcSnfqIuyn1hgGZzRHl8azIocrT2jX h0y3ixiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRsRi-0000000Ds9O-1lgk; Thu, 11 Jul 2024 11:58:46 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRsR0-0000000Drv9-1rBj for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2024 11:58:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 5B2E2CE18BD; Thu, 11 Jul 2024 11:58:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6143AC4AF0A; Thu, 11 Jul 2024 11:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720699079; bh=uHryF7P3s53hzSPX65b5enT1Suf8kLtu3Um7tBo2aqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nk2Cclksbhacht/7U8wa+Hzp2eZaUq+FFJmDSdYQ1D2Pwm0PDp2Y9BPBegvbiywiI g/usKJrJ6Onbk2Z47YpCmeB2QqtMKqySf0njtXYGTAVcYfsSZqKkvqrbRYqhMGP0+7 U61ElEdO4gqBCYzLtQIKwNMQ+c1/GiMqm9T/tuSXeDZMUyODkML2KiRjGp/+wLdV2l VFLvBkyI7liwTyFHgajRqIKBdTt2Sr1qygy5k4Zm1UkblY/If62qcyZRnQR3Z0Z8TI nrHcGqCuz05mIUCfIE0BAHRwPVgtpJ/RwrJcK5IrhAAjoi+30GUId86T77+mRn+wMp NMAcWlHgmLZIA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, arm@kernel.org, Andy Shevchenko , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH 02/10] irqchip/armada-370-xp: Use unsigned int type for virqs Date: Thu, 11 Jul 2024 13:57:40 +0200 Message-ID: <20240711115748.30268-3-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240711115748.30268-1-kabel@kernel.org> References: <20240711115748.30268-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240711_045802_712374_1621AE71 X-CRM114-Status: GOOD ( 12.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The return type of irq_find_mapping() and irq_linear_revmap() is unsigned int. Use the unsigned int type for the variables storing the return value. Signed-off-by: Marek BehĂșn Reviewed-by: Andrew Lunn --- drivers/irqchip/irq-armada-370-xp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 7016b206bddd..b29f3bbfb1c3 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -462,10 +462,10 @@ static const struct irq_domain_ops ipi_domain_ops = { static void ipi_resume(void) { for (int i = 0; i < IPI_DOORBELL_END; i++) { - int virq; + unsigned int virq; virq = irq_find_mapping(ipi_domain, i); - if (virq <= 0) + if (!virq) continue; if (irq_percpu_is_enabled(virq)) { struct irq_data *d; @@ -539,7 +539,7 @@ static void armada_xp_mpic_reenable_percpu(void) /* Re-enable per-CPU interrupts that were enabled before suspend */ for (unsigned int irq = 0; irq < MPIC_MAX_PER_CPU_IRQS; irq++) { struct irq_data *data; - int virq; + unsigned int virq; virq = irq_linear_revmap(armada_370_xp_mpic_domain, irq); if (virq == 0) @@ -734,7 +734,7 @@ static void armada_370_xp_mpic_resume(void) nirqs = (readl(main_int_base + MPIC_INT_CONTROL) >> 2) & 0x3ff; for (irq_hw_number_t irq = 0; irq < nirqs; irq++) { struct irq_data *data; - int virq; + unsigned int virq; virq = irq_linear_revmap(armada_370_xp_mpic_domain, irq); if (virq == 0)