mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
spi: spidev_test: abort when -I is selected without -S
-I (--iter) for transferring multiple iterations of the selected input currently only has an effect when transferring random data using -S (--size). Error out if -I is used without -S to avoid confusion. Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://patch.msgid.link/20260924-spi-sun4i-spidev_test-v7-5-126e31a07fdc@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
bd511c42d2
commit
683d7fac9b
|
|
@ -463,6 +463,9 @@ int main(int argc, char *argv[])
|
|||
if (random_input && transfer_size < 0)
|
||||
pabort("a size argument is mandatory for -S (--size)");
|
||||
|
||||
if (iterations && transfer_size < 0)
|
||||
pabort("-I (--iter) is only implemented for -S (--size)");
|
||||
|
||||
fd = open(device, O_RDWR);
|
||||
if (fd < 0)
|
||||
pabort("can't open device");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user