diff options
| author | Jonas Rebmann <jre@pengutronix.de> | 2026-09-24 15:43:55 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-24 21:57:50 +0100 |
| commit | 683d7fac9b0ff7aa8f0ff2ccfa0f4bbba99ee273 (patch) | |
| tree | 5228678b291a204df1c49861ed951ccc2e07facb | |
| parent | bd511c42d290807a04a325d584d65b98fd6721d7 (diff) | |
| download | linux-next-683d7fac9b0ff7aa8f0ff2ccfa0f4bbba99ee273.tar.gz linux-next-683d7fac9b0ff7aa8f0ff2ccfa0f4bbba99ee273.zip | |
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>
| -rw-r--r-- | tools/spi/spidev_test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c index 908ed038889b..97d09bf4dafb 100644 --- a/tools/spi/spidev_test.c +++ b/tools/spi/spidev_test.c @@ -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"); |
