From patchwork Tue Feb 25 11:02:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 13989814 X-Patchwork-Delegate: kw@linux.com Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 475EF26BD90; Tue, 25 Feb 2025 11:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.248.49.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740481394; cv=none; b=tm9CMiJxFHJL5ltftwui+Ej8qGJXeucvbL/6nU0/kS33dwML8MwvMxZZTYeVmQtIVAfvxDqckR5/9c4EjZvEszVXMi+pnNBBG3n2jsKcQnj0kvs0NiA4Pup90j9RVYlF5zLJm0LhJepVH367kXBtUnZR9UfTKuwEKSzHdlEZDr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740481394; c=relaxed/simple; bh=6iSypD6wLS9nPcxoTvkQ3A8LRGjbcu+KLJKPW1wXo+M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Cn70VtwhP357iHd6PwVWnvHq4sBM6qLwYZNiDVaGEIsLBe99mqwexcmCbuAAARf+DCAyrNZQ7vDoqijF7oAlvWNNAwtxzX8kfqp+GKRpZP3T14w8n/rkxfZdgN9nr2+t7AeMBy48TQBtF/0t5HLrte6bhWrsu+U975pghWfLrSg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com; spf=pass smtp.mailfrom=socionext.com; arc=none smtp.client-ip=202.248.49.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=socionext.com Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 25 Feb 2025 20:03:02 +0900 Received: from mail.mfilter.local (mail-arc02.css.socionext.com [10.213.46.40]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id E028020090C2; Tue, 25 Feb 2025 20:03:02 +0900 (JST) Received: from kinkan2.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Tue, 25 Feb 2025 20:03:02 +0900 Received: from plum.e01.socionext.com (unknown [10.212.245.39]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 8F77E3730; Tue, 25 Feb 2025 20:03:02 +0900 (JST) From: Kunihiko Hayashi To: Manivannan Sadhasivam , "Krzysztof Wilczynski" , Kishon Vijay Abraham I , Arnd Bergmann , Greg Kroah-Hartman , Lorenzo Pieralisi , Gustavo Pimentel , Bjorn Helgaas , Shuah Khan Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH v4 6/6] misc: pci_endpoint_test: Do not use managed irq functions Date: Tue, 25 Feb 2025 20:02:52 +0900 Message-Id: <20250225110252.28866-7-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250225110252.28866-1-hayashi.kunihiko@socionext.com> References: <20250225110252.28866-1-hayashi.kunihiko@socionext.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The pci_endpoint_test_request_irq() and pci_endpoint_test_release_irq() are called repeatedly by the users through pci_endpoint_test_set_irq(). So using the managed version of IRQ functions within these functions has no effect. Suggested-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kunihiko Hayashi Acked-by: Arnd Bergmann --- drivers/misc/pci_endpoint_test.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index 326e8e467c42..7a14114488a0 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -208,10 +208,9 @@ static void pci_endpoint_test_release_irq(struct pci_endpoint_test *test) { int i; struct pci_dev *pdev = test->pdev; - struct device *dev = &pdev->dev; for (i = 0; i < test->num_irqs; i++) - devm_free_irq(dev, pci_irq_vector(pdev, i), test); + free_irq(pci_irq_vector(pdev, i), test); test->num_irqs = 0; } @@ -224,9 +223,9 @@ static int pci_endpoint_test_request_irq(struct pci_endpoint_test *test) struct device *dev = &pdev->dev; for (i = 0; i < test->num_irqs; i++) { - ret = devm_request_irq(dev, pci_irq_vector(pdev, i), - pci_endpoint_test_irqhandler, - IRQF_SHARED, test->name, test); + ret = request_irq(pci_irq_vector(pdev, i), + pci_endpoint_test_irqhandler, IRQF_SHARED, + test->name, test); if (ret) goto fail; }