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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190110122358.GC1743@kadam>
Date:   Thu, 10 Jan 2019 15:23:58 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Sidong Yang <realwakka@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: vboxvideo: vbox_main: Remove unnecessary local
 variable

On Thu, Jan 10, 2019 at 06:13:47AM +0000, Sidong Yang wrote:
> Removed unnecessary local variable in have_hgsmi_mode_hints.
> The result of hgsmi_query_conf should be directly compared without
> assigning to local variable.
> 
> Signed-off-by: Sidong Yang <realwakka@...il.com>
> ---

I sort of prefer the original...

The hgsmi_query_conf() function returns negative error codes if it
can't complete the query because of allocation failures.  To me that's
more obvious, when we write it in the original way.

In the new code it looks like it returns bool or something.  The
copy_to/from_user() are normally written like if (copy_to_user()) {
but those don't return negative error codes so it's a different
situation.

This isn't something in checkpatch or CodingStyle so there isn't a
standard.  It's just personal opinion vs personal opinion.  If you were
going to do a lot of vboxvideo development, then it would be your
opinion which matters the most because you are doing the work.  But
this is your first vboxvideo patch...

Let's just leave it as-is.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ