[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdYoY9nRGD+4m7yzSci5n0YS3XeL+tgPDKWuaoqh3GSTyw@mail.gmail.com>
Date: Thu, 12 Sep 2019 00:06:05 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Saiyam Doshi <saiyamdoshi.in@...il.com>
Cc: Bartosz Golaszewski <bgolaszewski@...libre.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: remove explicit comparison with 0
On Sat, Sep 7, 2019 at 6:39 PM Saiyam Doshi <saiyamdoshi.in@...il.com> wrote:
> No need to compare return value with 0. In case of non-zero
> return value, the if condition will be true.
>
> This makes intent a bit more clear to the reader.
> "if (x) then", compared to "if (x is not zero) then".
>
> Signed-off-by: Saiyam Doshi <saiyamdoshi.in@...il.com>
Patch applied.
Yours,
Linus Walleij
Powered by blists - more mailing lists