[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vc=HLMVhQ30z9LTM7z+nmYgYPSRJib0PVTVW8H25eYg5g@mail.gmail.com>
Date: Sun, 5 Aug 2018 13:26:20 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: "Lee, Chun-Yi" <jlee@...e.com>, Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/x86: acer-wmi: use true and false for boolean values
On Sun, Aug 5, 2018 at 3:18 AM, Gustavo A. R. Silva
<gustavo@...eddedor.com> wrote:
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This code was detected with the help of Coccinelle.
> static bool has_cap(u32 cap)
> {
> if ((interface->capability & cap) != 0)
> - return 1;
> + return true;
>
> - return 0;
> + return false;
> }
this entire function can be oneliner:
return !!(...);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists