[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWb2ZxtFQC0ukCVbPhX2M50k0aQ0nvmRfD02FAksEJOfQ@mail.gmail.com>
Date: Thu, 13 Feb 2020 09:27:52 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Mark Brown <broonie@...nel.org>,
linux-spi <linux-spi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] spi: spidev_test: Use perror() only if errno is not 0
On Thu, Feb 13, 2020 at 5:17 AM Tiezhu Yang <yangtiezhu@...ngson.cn> 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@...ngson.cn>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.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
Powered by blists - more mailing lists