Re: [PATCH v4 10/17] PCI: epf-test: Cleanup pci_epf_test_cmd_handler()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 30, 2023 at 05:53:50PM +0900, Damien Le Moal wrote:
> 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.

> +	default:
> +		dev_err(dev, "Invalid command\n");

Include the invalid command value here for debugging.

> +		break;
>  	}
>  
>  reset_handler:
> -- 
> 2.39.2
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux