From patchwork Mon Jul 1 17:02:32 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: 13718451 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 D08C9C3065A for ; Mon, 1 Jul 2024 17:04:31 +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=TwUAldcDDRmKUngKuJEpahPwHZK+DRieQqezOfAJzOg=; b=ChFH6R3A49ON996WeeajjyQ04/ H+RL464E33x9c74veQdmsYN9eU/fFeJoq2N5V+pAgzaC63wInpettoOoj76nmcm24rAhvkcXRbtBx Py8ejxtYKtATCn399vnJAEa5IFQgsWbeJ13QzJJhNUm6cDEqawhm8EzLPv2FXaZE7Sr8R1k3KqGkC FgHlmXoSBiGJunbxaVslSoqhJXjJNf0/Tg9UUvL6/BOyT3pdzcbR8eQfIQkCf+F1RXYa0spIYYv8h lIXNN9blZj/GV5WFcP2gt/QVKNEN3YpITwjIHWqcvdXaFx48MsazbfFFFMxft/z+grnLJeBe3nU/9 hvAPvtPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOKRt-00000004Dvz-1q8h; Mon, 01 Jul 2024 17:04:17 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOKQu-00000004DSD-1ejN for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2024 17:03:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B8EB0616D8; Mon, 1 Jul 2024 17:03:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6441DC2BD10; Mon, 1 Jul 2024 17:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719853395; bh=QV1gYOO4bcLWs9Mem/IxQ8wiF5G1uGrYjiEESZq9hpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Itn+w5/d8rx+Jrnzu0AVhOwjdPfB0YDdKZRHK4y/j5zm4IoGamNyrLQmvDTKdEkez Ewzjmiz/jkUDHBOVjpsxXQUO0vzgUOT8dFjVZgqvbXt9j6hktZbd8blC4P1MxzdMHP Rj+7BQnzOG7yil+jy6RV18RTuHUSFqeyOzoAx9dGntAk0Tq9BIAFStIQv0o5QKu3Tw g9/ViLz2eZBbsi7E0P61FraZYpNl6L5kowjx7pyjOgLjTIUdSQioq4TZ5X9QuNEL+7 wMXp5Rg7pFayT7Ap2oXKupjY8okM2YAulXeCHBXaVY2EJZDflhSSA5/ER6P9rp1nAV k4cwiI0+/+/8w== 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 08/25] irqchip/armada-370-xp: Simplify is_percpu_irq() code Date: Mon, 1 Jul 2024 19:02:32 +0200 Message-ID: <20240701170249.8128-9-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240701170249.8128-1-kabel@kernel.org> References: <20240701170249.8128-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240701_100316_533480_B83F7F86 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. 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 Simplify the code in the is_percpu_irq() function. Instead of if (condition) return true; return false; simply return condition. Signed-off-by: Marek BehĂșn Reviewed-by: Andrew Lunn --- drivers/irqchip/irq-armada-370-xp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index b9631cc25c0b..cfd6dc803150 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -201,10 +201,7 @@ static inline unsigned int msi_doorbell_end(void) static inline bool is_percpu_irq(irq_hw_number_t irq) { - if (irq <= MPIC_MAX_PER_CPU_IRQS) - return true; - - return false; + return irq <= MPIC_MAX_PER_CPU_IRQS; } /*