lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 5 Jun 2018 07:36:56 -0500
From:   Alex Elder <elder@...aro.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Johan Hovold <johan@...oldconsulting.com>
Cc:     devel@...verdev.osuosl.org,
        Janani Sankara Babu <jananis37@...il.com>,
        linux-kernel@...r.kernel.org, greybus-dev@...ts.linaro.org
Subject: Re: [greybus-dev] [PATCH] Staging:greybus Fix comparison to NULL

On 06/05/2018 04:00 AM, Dan Carpenter wrote:
> On Tue, Jun 05, 2018 at 11:02:36AM +0530, Viresh Kumar wrote:
>> On 03-06-18, 08:52, Janani Sankara Babu wrote:
>>> This patch replaces comparison of var to NULL with !var
>>>
>>> Signed-off-by: Janani Sankara Babu <jananis37@...il.com>

Wow, such deep discussion for such a trivial patch!

I say we take it, mostly because I personally prefer being
permissive if there's nothing technically wrong with a patch,
but also because I'm swayed by the other comments.

That being said, I agree with Johan--the patch would be
improved with a little better comment about what motivated
the submission.  So I'll wait for v2.

					-Alex

>>> ---
>>>  drivers/staging/greybus/core.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
>>> index dafa430..5d14a4e 100644
>>> --- a/drivers/staging/greybus/core.c
>>> +++ b/drivers/staging/greybus/core.c
>>> @@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle,
>>>  static const struct greybus_bundle_id *
>>>  greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id)
>>>  {
>>> -	if (id == NULL)
>>> +	if (!id)
>>
>> It is pretty much personal preference and there is no good reason to accept this
>> patch really.
> 
> Checkpatch complains, so it's Official Kernel Style now.
> 
> The != NULL comparison is a double negative which makes it not less
> annoying than official kernel style.
> 
> regards,
> dan carpenter
> 
> _______________________________________________
> greybus-dev mailing list
> greybus-dev@...ts.linaro.org
> https://lists.linaro.org/mailman/listinfo/greybus-dev
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ