From: "Arnd Bergmann" <arnd@arndb.de>
To: "Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
"Bjorn Helgaas" <bhelgaas@google.com>, shuah <shuah@kernel.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
"Niklas Cassel" <cassel@kernel.org>
Subject: Re: [PATCH v4 5/6] misc: pci_endpoint_test: Remove global 'irq_type' and 'no_msi'
Date: Tue, 25 Feb 2025 12:13:31 +0100 [thread overview]
Message-ID: <87857a72-eca0-4919-8e1d-ff04b9047d82@app.fastmail.com> (raw)
In-Reply-To: <20250225110252.28866-6-hayashi.kunihiko@socionext.com>
On Tue, Feb 25, 2025, at 12:02, Kunihiko Hayashi wrote:
> The global variable "irq_type" preserves the current value of
> ioctl(GET_IRQTYPE).
>
> However, all tests that use interrupts first call ioctl(SET_IRQTYPE)
> to set test->irq_type, then write the value of test->irq_type into the
> register pointed by test_reg_bar, and request the interrupt to the
> endpoint. The endpoint function driver, pci-epf-test, refers to the
> register, and determine which type of interrupt to raise.
>
> The global variable "irq_type" is never used in the actual test,
> so remove the variable and replace it with test->irq_type.
>
> And also for the same reason, the variable "no_msi" can be removed.
>
> Initially, test->irq_type has IRQ_TYPE_UNDEFINED, and the
> ioctl(GET_IRQTYPE) before calling ioctl(SET_IRQTYPE) will return an error.
>
> Suggested-by: Niklas Cassel <cassel@kernel.org>
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Nice catch, always good to remove global variables with too generic names.
Acked-by: Arnd Bergmann <arnd@arndb.de>
next prev parent reply other threads:[~2025-02-25 11:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 11:02 [PATCH v4 0/6] Fix some issues related to an interrupt type in pci_endpoint_test Kunihiko Hayashi
2025-02-25 11:02 ` [PATCH v4 1/6] selftests: pci_endpoint: Add GET_IRQTYPE checks to each interrupt test Kunihiko Hayashi
2025-02-25 11:02 ` [PATCH v4 2/6] misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error Kunihiko Hayashi
2025-02-25 11:02 ` [PATCH v4 3/6] misc: pci_endpoint_test: Fix displaying irq_type " Kunihiko Hayashi
2025-02-25 11:02 ` [PATCH v4 4/6] misc: pci_endpoint_test: Fix irq_type to convey the correct type Kunihiko Hayashi
2025-03-13 17:00 ` Manivannan Sadhasivam
2025-02-25 11:02 ` [PATCH v4 5/6] misc: pci_endpoint_test: Remove global 'irq_type' and 'no_msi' Kunihiko Hayashi
2025-02-25 11:13 ` Arnd Bergmann [this message]
2025-03-13 17:00 ` Manivannan Sadhasivam
2025-02-25 11:02 ` [PATCH v4 6/6] misc: pci_endpoint_test: Do not use managed irq functions Kunihiko Hayashi
2025-02-25 11:15 ` Arnd Bergmann
2025-03-05 18:18 ` [PATCH v4 0/6] Fix some issues related to an interrupt type in pci_endpoint_test Krzysztof Wilczynski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87857a72-eca0-4919-8e1d-ff04b9047d82@app.fastmail.com \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox