From patchwork Mon Feb 20 09:19:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 13146189 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4D2CDC636CC for ; Mon, 20 Feb 2023 09:19:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B019B10E631; Mon, 20 Feb 2023 09:19:55 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF0B610E62E for ; Mon, 20 Feb 2023 09:19:50 +0000 (UTC) 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 41B0F60C5D; Mon, 20 Feb 2023 09:19:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1667C4339B; Mon, 20 Feb 2023 09:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676884789; bh=V4TVZxh0REU06owZbOBfkGb6UcK0GUmZ8CruRKAvwHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDrIbG1ZmKGYo+C5Cbe5njIPMZxZvvvgBvWOZqRk0+gtsAV5bPjsq0iBELremF1cW Xk/O85gKgXp5x8go7Qkl4maTHX0EUUYpxJAwyI61ztFqg/KzXljbsPyrcztZ8Ac/Lj +yVp2upm5AwhfdiexN/eq7wBlXGb/U2WVAhOnnwcnwLcvnyppqbiGZig5RlOdcUW4q bBYmkPwczSfcptth6t1y8jEmjYBGt3VZMDoS0bG7sQW9kbUxWzV6m05t1135aGLCUX 3/IqLrstPGqUKz6BRjJU1FTbsy3d07cuk50jxgl5lbUZuiZPuN/8G9uD+9rJH0CXxY tiGTuXjjHuo/A== From: Oded Gabbay To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/4] habanalabs/gaudi2: remove unneeded irq_handler variable Date: Mon, 20 Feb 2023 11:19:39 +0200 Message-Id: <20230220091939.3467487-4-ogabbay@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230220091939.3467487-1-ogabbay@kernel.org> References: <20230220091939.3467487-1-ogabbay@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomer Tayar Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Tomer Tayar 'irq_handler' in gaudi2_enable_msix(), is just assigned with a function name and then used when calling request_threaded_irq(). Remove the variable and use the function name directly as an argument. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c index 5a225f23961b..2021ef9d4702 100644 --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c @@ -3974,7 +3974,6 @@ static int gaudi2_enable_msix(struct hl_device *hdev) struct asic_fixed_properties *prop = &hdev->asic_prop; struct gaudi2_device *gaudi2 = hdev->asic_specific; int rc, irq, i, j, user_irq_init_cnt; - irq_handler_t irq_handler; struct hl_cq *cq; if (gaudi2->hw_cap_initialized & HW_CAP_MSIX) @@ -4024,10 +4023,9 @@ static int gaudi2_enable_msix(struct hl_device *hdev) i++, j++, user_irq_init_cnt++) { irq = pci_irq_vector(hdev->pdev, i); - irq_handler = hl_irq_handler_user_interrupt; - - rc = request_threaded_irq(irq, irq_handler, hl_irq_user_interrupt_thread_handler, - IRQF_ONESHOT, gaudi2_irq_name(i), &hdev->user_interrupt[j]); + rc = request_threaded_irq(irq, hl_irq_handler_user_interrupt, + hl_irq_user_interrupt_thread_handler, IRQF_ONESHOT, + gaudi2_irq_name(i), &hdev->user_interrupt[j]); if (rc) { dev_err(hdev->dev, "Failed to request IRQ %d", irq);