summaryrefslogtreecommitdiff
path: root/drivers/misc/pci_endpoint_test.c
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2023-04-15 11:35:35 +0900
committerBjorn Helgaas <bhelgaas@google.com>2023-06-23 15:02:39 -0500
commit96d513f5ed4cafafa31ed99f74ad527f6b0ff47b (patch)
tree5b398ab96d50d922550a366bdb65e4d42d41829f /drivers/misc/pci_endpoint_test.c
parentfc97f5f7c23735da0c7314533203306d96a038fb (diff)
PCI: epf-test: Cleanup pci_epf_test_cmd_handler()
Command codes are never combined together as flags into a single value. Thus we can replace the series of "if" tests in pci_epf_test_cmd_handler() with a cleaner switch-case statement. This also allows checking that we got a valid command and print an error message if we did not. Link: https://lore.kernel.org/r/20230415023542.77601-11-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/misc/pci_endpoint_test.c')
0 files changed, 0 insertions, 0 deletions