linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] spi: spidev_test: Remove break after exit statement
@ 2020-02-13  4:16 Tiezhu Yang
  2020-02-13  4:16 ` [PATCH 2/4] spi: spidev_test: Check input_tx and input_file first after parse options Tiezhu Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tiezhu Yang @ 2020-02-13  4:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel

When call print_usage() in parse_opts(), it will exit directly.
Since break is not useful after exit statement, remove it.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 tools/spi/spidev_test.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 3559e76..113b1e1 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -283,7 +283,6 @@ static void parse_opts(int argc, char *argv[])
 			break;
 		default:
 			print_usage(argv[0]);
-			break;
 		}
 	}
 	if (mode & SPI_LOOP) {
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/4] spi: spidev_test: Check input_tx and input_file first after parse options
  2020-02-13  4:16 [PATCH 1/4] spi: spidev_test: Remove break after exit statement Tiezhu Yang
@ 2020-02-13  4:16 ` Tiezhu Yang
       [not found]   ` <1581567368-8055-2-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2020-02-13 13:32   ` Applied "spi: spidev_test: Check input_tx and input_file first after parse options" to the spi tree Mark Brown
  2020-02-13  4:16 ` [PATCH 3/4] spi: spidev_test: Use perror() only if errno is not 0 Tiezhu Yang
       [not found] ` <1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2 siblings, 2 replies; 11+ messages in thread
From: Tiezhu Yang @ 2020-02-13  4:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel

It is better to check input_tx and input_file first after parse options.
Otherwise, it will do some useless operations when both -p and --input
are selected.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 tools/spi/spidev_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 113b1e1..5866178 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -404,6 +404,9 @@ int main(int argc, char *argv[])
 
 	parse_opts(argc, argv);
 
+	if (input_tx && input_file)
+		pabort("only one of -p and --input may be selected");
+
 	fd = open(device, O_RDWR);
 	if (fd < 0)
 		pabort("can't open device");
@@ -445,9 +448,6 @@ int main(int argc, char *argv[])
 	printf("bits per word: %d\n", bits);
 	printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000);
 
-	if (input_tx && input_file)
-		pabort("only one of -p and --input may be selected");
-
 	if (input_tx)
 		transfer_escaped_string(fd, input_tx);
 	else if (input_file)
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/4] spi: spidev_test: Use perror() only if errno is not 0
  2020-02-13  4:16 [PATCH 1/4] spi: spidev_test: Remove break after exit statement Tiezhu Yang
  2020-02-13  4:16 ` [PATCH 2/4] spi: spidev_test: Check input_tx and input_file first after parse options Tiezhu Yang
@ 2020-02-13  4:16 ` Tiezhu Yang
       [not found]   ` <1581567368-8055-3-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2020-02-13 13:32   ` Applied "spi: spidev_test: Use perror() only if errno is not 0" to the spi tree Mark Brown
       [not found] ` <1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2 siblings, 2 replies; 11+ messages in thread
From: Tiezhu Yang @ 2020-02-13  4:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel

It is better to use perror() only if errno is not 0, it should use printf()
when errno is 0, otherwise there exists redudant ": Success".

E.g. without this patch:

$ ./spidev_test -p 1234 --input test.bin
only one of -p and --input may be selected: Success
Aborted (core dumped)

With this patch:

$ ./spidev_test -p 1234 --input test.bin
only one of -p and --input may be selected
Aborted (core dumped)

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 tools/spi/spidev_test.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 5866178..27967dd 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <errno.h>
 #include <getopt.h>
 #include <fcntl.h>
 #include <time.h>
@@ -26,7 +27,11 @@
 
 static void pabort(const char *s)
 {
-	perror(s);
+	if (errno != 0)
+		perror(s);
+	else
+		printf("%s\n", s);
+
 	abort();
 }
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 4/4] spi: spidev_test: Remove the whole "include" directory when make clean
       [not found] ` <1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
@ 2020-02-13  4:16   ` Tiezhu Yang
       [not found]     ` <1581567368-8055-4-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2020-02-13  8:23   ` [PATCH 1/4] spi: spidev_test: Remove break after exit statement Geert Uytterhoeven
  2020-02-13 13:32   ` Applied "spi: spidev_test: Remove break after exit statement" to the spi tree Mark Brown
  2 siblings, 1 reply; 11+ messages in thread
From: Tiezhu Yang @ 2020-02-13  4:16 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA

In the current code, it only removes "include/linux/spi/spidev.h" file
when make clean and there still exists useless "include/linux/spi/"
directory, just remove it.

Signed-off-by: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
---
 tools/spi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/spi/Makefile b/tools/spi/Makefile
index 5c342e6..2249a15 100644
--- a/tools/spi/Makefile
+++ b/tools/spi/Makefile
@@ -51,7 +51,7 @@ $(OUTPUT)spidev_fdx: $(SPIDEV_FDX_IN)
 
 clean:
 	rm -f $(ALL_PROGRAMS)
-	rm -f $(OUTPUT)include/linux/spi/spidev.h
+	rm -rf $(OUTPUT)include/
 	find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
 
 install: $(ALL_PROGRAMS)
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] spi: spidev_test: Remove break after exit statement
       [not found] ` <1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2020-02-13  4:16   ` [PATCH 4/4] spi: spidev_test: Remove the whole "include" directory when make clean Tiezhu Yang
@ 2020-02-13  8:23   ` Geert Uytterhoeven
  2020-02-13 13:32   ` Applied "spi: spidev_test: Remove break after exit statement" to the spi tree Mark Brown
  2 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-13  8:23 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Mark Brown, linux-spi, Linux Kernel Mailing List

On Thu, Feb 13, 2020 at 5:17 AM Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org> wrote:
> When call print_usage() in parse_opts(), it will exit directly.
> Since break is not useful after exit statement, remove it.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] spi: spidev_test: Check input_tx and input_file first after parse options
       [not found]   ` <1581567368-8055-2-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
@ 2020-02-13  8:26     ` Geert Uytterhoeven
  0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-13  8:26 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Mark Brown, linux-spi, Linux Kernel Mailing List

Hi Tiezhu,

On Thu, Feb 13, 2020 at 5:17 AM Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org> wrote:
> It is better to check input_tx and input_file first after parse options.
> Otherwise, it will do some useless operations when both -p and --input
> are selected.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

> --- a/tools/spi/spidev_test.c
> +++ b/tools/spi/spidev_test.c
> @@ -404,6 +404,9 @@ int main(int argc, char *argv[])
>
>         parse_opts(argc, argv);
>
> +       if (input_tx && input_file)
> +               pabort("only one of -p and --input may be selected");
> +

Alternatively, this check could be moved to the end of parse_opts().

>         fd = open(device, O_RDWR);
>         if (fd < 0)
>                 pabort("can't open device");

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] spi: spidev_test: Use perror() only if errno is not 0
       [not found]   ` <1581567368-8055-3-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
@ 2020-02-13  8:27     ` Geert Uytterhoeven
  0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-02-13  8:27 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Mark Brown, linux-spi, Linux Kernel Mailing List

On Thu, Feb 13, 2020 at 5:17 AM Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org> wrote:
> It is better to use perror() only if errno is not 0, it should use printf()
> when errno is 0, otherwise there exists redudant ": Success".
>
> E.g. without this patch:
>
> $ ./spidev_test -p 1234 --input test.bin
> only one of -p and --input may be selected: Success
> Aborted (core dumped)
>
> With this patch:
>
> $ ./spidev_test -p 1234 --input test.bin
> only one of -p and --input may be selected
> Aborted (core dumped)
>
> Signed-off-by: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Applied "spi: spidev_test: Remove the whole "include" directory when make clean" to the spi tree
       [not found]     ` <1581567368-8055-4-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
@ 2020-02-13 13:32       ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-02-13 13:32 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Brown

The patch

   spi: spidev_test: Remove the whole "include" directory when make clean

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From aea7afd9079f2e43b05790241d748ff0537ec917 Mon Sep 17 00:00:00 2001
From: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
Date: Thu, 13 Feb 2020 12:16:08 +0800
Subject: [PATCH] spi: spidev_test: Remove the whole "include" directory when
 make clean

In the current code, it only removes "include/linux/spi/spidev.h" file
when make clean and there still exists useless "include/linux/spi/"
directory, just remove it.

Signed-off-by: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
Link: https://lore.kernel.org/r/1581567368-8055-4-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 tools/spi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/spi/Makefile b/tools/spi/Makefile
index 5c342e655e55..2249a1546cc1 100644
--- a/tools/spi/Makefile
+++ b/tools/spi/Makefile
@@ -51,7 +51,7 @@ $(OUTPUT)spidev_fdx: $(SPIDEV_FDX_IN)
 
 clean:
 	rm -f $(ALL_PROGRAMS)
-	rm -f $(OUTPUT)include/linux/spi/spidev.h
+	rm -rf $(OUTPUT)include/
 	find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.d' -delete
 
 install: $(ALL_PROGRAMS)
-- 
2.20.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Applied "spi: spidev_test: Use perror() only if errno is not 0" to the spi tree
  2020-02-13  4:16 ` [PATCH 3/4] spi: spidev_test: Use perror() only if errno is not 0 Tiezhu Yang
       [not found]   ` <1581567368-8055-3-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
@ 2020-02-13 13:32   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-02-13 13:32 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: linux-kernel, linux-spi, Mark Brown

The patch

   spi: spidev_test: Use perror() only if errno is not 0

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 470a072e12200576788dc622d58894609feae2d7 Mon Sep 17 00:00:00 2001
From: Tiezhu Yang <yangtiezhu@loongson.cn>
Date: Thu, 13 Feb 2020 12:16:07 +0800
Subject: [PATCH] spi: spidev_test: Use perror() only if errno is not 0

It is better to use perror() only if errno is not 0, it should use printf()
when errno is 0, otherwise there exists redudant ": Success".

E.g. without this patch:

$ ./spidev_test -p 1234 --input test.bin
only one of -p and --input may be selected: Success
Aborted (core dumped)

With this patch:

$ ./spidev_test -p 1234 --input test.bin
only one of -p and --input may be selected
Aborted (core dumped)

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1581567368-8055-3-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/spi/spidev_test.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 5866178cdcc9..27967dd90f8f 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <errno.h>
 #include <getopt.h>
 #include <fcntl.h>
 #include <time.h>
@@ -26,7 +27,11 @@
 
 static void pabort(const char *s)
 {
-	perror(s);
+	if (errno != 0)
+		perror(s);
+	else
+		printf("%s\n", s);
+
 	abort();
 }
 
-- 
2.20.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Applied "spi: spidev_test: Check input_tx and input_file first after parse options" to the spi tree
  2020-02-13  4:16 ` [PATCH 2/4] spi: spidev_test: Check input_tx and input_file first after parse options Tiezhu Yang
       [not found]   ` <1581567368-8055-2-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
@ 2020-02-13 13:32   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-02-13 13:32 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: linux-kernel, linux-spi, Mark Brown

The patch

   spi: spidev_test: Check input_tx and input_file first after parse options

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 1f3c36328a487059beebd1f7be042e3b7abf7d34 Mon Sep 17 00:00:00 2001
From: Tiezhu Yang <yangtiezhu@loongson.cn>
Date: Thu, 13 Feb 2020 12:16:06 +0800
Subject: [PATCH] spi: spidev_test: Check input_tx and input_file first after
 parse options

It is better to check input_tx and input_file first after parse options.
Otherwise, it will do some useless operations when both -p and --input
are selected.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1581567368-8055-2-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/spi/spidev_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 113b1e1d62ca..5866178cdcc9 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -404,6 +404,9 @@ int main(int argc, char *argv[])
 
 	parse_opts(argc, argv);
 
+	if (input_tx && input_file)
+		pabort("only one of -p and --input may be selected");
+
 	fd = open(device, O_RDWR);
 	if (fd < 0)
 		pabort("can't open device");
@@ -445,9 +448,6 @@ int main(int argc, char *argv[])
 	printf("bits per word: %d\n", bits);
 	printf("max speed: %d Hz (%d KHz)\n", speed, speed/1000);
 
-	if (input_tx && input_file)
-		pabort("only one of -p and --input may be selected");
-
 	if (input_tx)
 		transfer_escaped_string(fd, input_tx);
 	else if (input_file)
-- 
2.20.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Applied "spi: spidev_test: Remove break after exit statement" to the spi tree
       [not found] ` <1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
  2020-02-13  4:16   ` [PATCH 4/4] spi: spidev_test: Remove the whole "include" directory when make clean Tiezhu Yang
  2020-02-13  8:23   ` [PATCH 1/4] spi: spidev_test: Remove break after exit statement Geert Uytterhoeven
@ 2020-02-13 13:32   ` Mark Brown
  2 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2020-02-13 13:32 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Brown

The patch

   spi: spidev_test: Remove break after exit statement

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 020bd6c48ebd864d42b5b551a87a323e443918a6 Mon Sep 17 00:00:00 2001
From: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
Date: Thu, 13 Feb 2020 12:16:05 +0800
Subject: [PATCH] spi: spidev_test: Remove break after exit statement

When call print_usage() in parse_opts(), it will exit directly.
Since break is not useful after exit statement, remove it.

Signed-off-by: Tiezhu Yang <yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
Link: https://lore.kernel.org/r/1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 tools/spi/spidev_test.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c
index 3559e7646256..113b1e1d62ca 100644
--- a/tools/spi/spidev_test.c
+++ b/tools/spi/spidev_test.c
@@ -283,7 +283,6 @@ static void parse_opts(int argc, char *argv[])
 			break;
 		default:
 			print_usage(argv[0]);
-			break;
 		}
 	}
 	if (mode & SPI_LOOP) {
-- 
2.20.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-02-13 13:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13  4:16 [PATCH 1/4] spi: spidev_test: Remove break after exit statement Tiezhu Yang
2020-02-13  4:16 ` [PATCH 2/4] spi: spidev_test: Check input_tx and input_file first after parse options Tiezhu Yang
     [not found]   ` <1581567368-8055-2-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
2020-02-13  8:26     ` Geert Uytterhoeven
2020-02-13 13:32   ` Applied "spi: spidev_test: Check input_tx and input_file first after parse options" to the spi tree Mark Brown
2020-02-13  4:16 ` [PATCH 3/4] spi: spidev_test: Use perror() only if errno is not 0 Tiezhu Yang
     [not found]   ` <1581567368-8055-3-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
2020-02-13  8:27     ` Geert Uytterhoeven
2020-02-13 13:32   ` Applied "spi: spidev_test: Use perror() only if errno is not 0" to the spi tree Mark Brown
     [not found] ` <1581567368-8055-1-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
2020-02-13  4:16   ` [PATCH 4/4] spi: spidev_test: Remove the whole "include" directory when make clean Tiezhu Yang
     [not found]     ` <1581567368-8055-4-git-send-email-yangtiezhu-cXZgJK919ebM1kAEIRd3EQ@public.gmane.org>
2020-02-13 13:32       ` Applied "spi: spidev_test: Remove the whole "include" directory when make clean" to the spi tree Mark Brown
2020-02-13  8:23   ` [PATCH 1/4] spi: spidev_test: Remove break after exit statement Geert Uytterhoeven
2020-02-13 13:32   ` Applied "spi: spidev_test: Remove break after exit statement" to the spi tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).