diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2023-04-15 04:35:33 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-06-23 22:00:59 +0200 |
commit | 48d19fc6e4a74e8f7d395f0186cd9e6f93c6ee26 (patch) | |
tree | 0e90f784472e39be3310602d5617157576ba6340 /drivers/iio/position | |
parent | PCI: epf-test: Simplify pci_epf_test_raise_irq() (diff) | |
download | linux-48d19fc6e4a74e8f7d395f0186cd9e6f93c6ee26.tar.xz linux-48d19fc6e4a74e8f7d395f0186cd9e6f93c6ee26.zip |
PCI: epf-test: Simplify IRQ test commands execution
For the commands COMMAND_RAISE_LEGACY_IRQ, COMMAND_RAISE_MSI_IRQ and
COMMAND_RAISE_MSIX_IRQ, the function pci_epf_test_cmd_handler()
sets the STATUS_IRQ_RAISED status flag and calls the epc function
pci_epc_raise_irq() directly. However, this is also exactly what the
pci_epf_test_raise_irq() function does. Avoid duplicating these
operations by directly using pci_epf_test_raise_irq() for the IRQ test
commands. It is OK to do so as the host side endpoint test driver always
set the correct IRQ type for the IRQ test commands.
At the same time, move the IRQ number check done for the
COMMAND_RAISE_MSI_IRQ and COMMAND_RAISE_MSIX_IRQ commands
to pci_epf_test_raise_irq(), to also check the IRQ number requested
by the host for other test commands.
This significantly simplifies pci_epf_test_cmd_handler().
Link: https://lore.kernel.org/r/20230415023542.77601-9-dlemoal@kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Diffstat (limited to 'drivers/iio/position')
0 files changed, 0 insertions, 0 deletions