Skip to content
Unverified Commit a402006d authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by Krzysztof Wilczyński
Browse files

misc: pci_endpoint_test: Remove global 'irq_type' and 'no_msi'



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".

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: default avatarNiklas Cassel <cassel@kernel.org>
Suggested-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Kunihiko Hayashi's avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
[kwilczynski: commit log]
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250225110252.28866-6-hayashi.kunihiko@socionext.com
parent baaef0a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment